class Type { public Object getTypeName(){ return "Type"; } } class SubType extends Type { public String getTypeName(){//line 8 return "SubType"; } } public class Tester { public static void main(String[] args) { Type first = new SubType(); //line 16 System.out.println(first.getTypeName()); //line 17 } }
public Object getTypeName(){
return "Type";
}
class SubType extends Type {
public String getTypeName(){//line 8
return "SubType";
public class Tester {
public static void main(String[] args) {
Type first = new SubType(); //line 16
System.out.println(first.getTypeName()); //line 17
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.