1. class A { 2. public byte getNumber() { 3. return 1; 4. } 5. } 6. 7. class B extends A { 8. public short getNumber() { 9. return 2; 10. } 11. 12. public static void main(String args[]) { 13. B b = new B(); 14. System.out.println(b.getNumber()); 15. } 16. }
Show comments for this question (1) Add comments Link to this question