System.out.println("OA's version of getAttr returns: " +
new OA().getAttr());
System.out.println("OB's version of getAttr returns: " +
new OB().getAttr());
// Declared as OA, instantiated as OB, so gets OB's version of things.
OA c = new OB();
System.out.println("C's version of getAttr returns: " +
c.getAttr());