public class StaticTest { // instance variable -- one copy for every StaticTest instance private int x = 0; // static variable -- one copy for the entire class (not per instance) private static int y = 0; public StaticTest() { x++; y++; System.out.println("x is " + x); System.out.println("y is " + y); } public static void main(String[] args) { StaticTest t1 = new StaticTest(); StaticTest t2 = new StaticTest(); StaticTest t3 = new StaticTest(); } }