Single instance for a class instantiation Private keyword hides the class constructor for outside class MyClass private static $INSTANCE public static function getInstance() return self::INSTANCE
Static variables, initialized only once Methods, belongs to class, not to instance static int count; static long myRound(Double n) return Math.round(n)
Static factory, a static instance Telescoping, JavaBeans, Builder static A INSTANCE = new A() new A(240); new A(240, 100)
Import static, to avoid qualifying Potential negative impact on readabilty import static java.lang.Math.PI assertEquals(PI == Math.PI, true)
Java 8 allows static methods in interfaces Method reference, call methods on its parameter abstract interface A<T> extends Stream<T> static <T> Stream<T> of(T... values) {} A.stream().map(String::toUpperCase)