/* Author: James Tam Version: March 1, 2017 Illustrates how a child class has direct access to all non-private parts of the parent. */ public class Driver { public static void main(String [] args) { Child c = new Child(12); c.m1(); // Calling parent's m1 c.m2(); // Call child's m1 // Syntax error, permission violation if uncommented // System.out.println(c.num); System.out.println(c.getNum()); } }