public class HourlyEmployee extends Employee { public HourlyEmployee() {super();} public HourlyEmployee(String first) {super(first);} // call to one-argument constructor of base class public String toString() {return "the value is " + getFirst();} public String baseToString() {return super.toString();} public static void main(String [] args) { HourlyEmployee h = new HourlyEmployee(); h.setFirst("Howdy"); // System.out.println(h.first); subclass can't access private members of base class by name System.out.println(h.getFirst()); System.out.println(h.toString()); System.out.println(h.baseToString()); // System.out.println(h.super.toString()); produces error - why? // HourlyEmployee h1 = new HourlyEmployee("Bill"); consturctors aren't inherited } }