// IV5: the IV series continues // The following code creates an "infinite loop" (kind of). // Why? Creating an object from the subclass means the constructor of // the superclass is called which means another object from class $B$ // is created which means..... // The lesson? Be careful where and when you create objects. public class iv5 { public static void main(String[] args) { new A(); } } class A { B b = new B(); } class B extends A { }