class B extends A { public B(int n) { setCount(n); } public int newMethod() { return 2; } public void setCount(int count) { System.out.println("I'm in B!"); super.setCount(count); // call corresponding method from superclass } //public void mySetCount(int count) { // this.count = count; //} }