/* * ASuperClass.java 1.0 * * Example for OOP * Example has its main method in InitializeOrderTest * */ public class ASuperClass { private TellTale field1; // First field with an initializer. // The TellTale says A when instantiated static private TellTale field2 = new TellTale("A"); ASuperClass(){ System.out.println("Starting construtor in ASuperClass"); field1 = new TellTale("In super constructor"); System.out.println("Ending construtor in ASuperClass"); } { // This is an initializer block. Initializer blocks // are rarely used in practice, one should normally do // initialization in the constructor. Initializer blocks // as well as normal initialzers are executed before // the constructor System.out.println("Initializer block in ASuperClass"); } private TellTale field3 = new TellTale("C"); }