/* Author: James Tam Version: 2015 */ public class Driver { public static void main(String [] args) { // Can access static attribute here even with no instances // At this point there's one memory location for Foo.x Foo.x = 777; // Created one instance of attribute 'y', still just one instance // of Foo.x Foo f1 = new Foo(); Foo f2; // Created another instance of attribute 'y' (total = 2), // still just one instance of Foo.x f2 = new Foo(); } }