A static class implementation of Singleton pattern

/*
The Design Patterns Java Companion
Copyright (C) 1998, by James W. Cooper
IBM Thomas J. Watson Research Center
*/
final class Spooler {
static public void print(String s) {
System.out.println(s);
}
}
public class StaticSpool {
public static void main(String argv[]) {
Spooler.print("here it is");
}
}
Related examples in the same category