/* An example from Java: A beginners's guide by Herbert Schildt that illustrates the the strongly typed nature of Java. A reference for one type of object cannot normally refer to another type of object except whne a reference of a superclass is referred to an object that's a subclass. v1 - won't compile. v2 - uses inheritance and will compile */ public class Yv2 extends Xv2 { private int b; public Yv2(int i, int j) { super(i); b = i; } public int getB () { return b; } public void setB (int n) { b = n; } }