Java Classes and Objects Initialization – Constructors called to create every object –All variables given initial values Instance variable – one for each object Static variable – one for entire class Static fields initialized once with initialization expressions or static initialization block inside class Public static int x = 3; public class Dog { … static {/* code executed once when class is loaded */} }
{}