/* * ASubClass.java 1.0 * * Example for OOP * */ package dk.itu.oop.lecture2; public class ASubClass extends ASuperClass{ private TellTale field4; // Field without initializer private TellTale field5 = new TellTale("AA"); // With initializer { System.out.println("Initializer block in ASubClass"); } ASubClass(){ super(); System.out.println("Starting construtor in ASubClass"); field4 = new TellTale("In subclass constructor"); System.out.println("Starting construtor in ASubClass"); } // One final field, with initializer. Notice that it is // placed after the constructor, but executed before, as // all initializers are executed before the constructor private TellTale field6 = new TellTale("CC"); }