I created a class, that roughly looks like this. Does pattern of such type of class (accessible everywhere, without instance) has some name? Or this is typical Utility pattern?
public class CodingLogger {
private static StringBuffer buffer = new StringBuffer();
public static void println(Object o) {
System.out.println(String.valueOf(o));
buffer.append(String.valueOf(o) + LINE_SEPARATOR);
}
}
Aucun commentaire:
Enregistrer un commentaire