public class polymorphism {
public void show()
{
System.out.println();
}
public void show(int i)
{
System.out.println("6");
}
public class B extends polymorphism
{
}
/** * @param args the command line arguments */
public static void main(String[] args)
{
// TODO code application logic here B obj=new B(); obj.show();
}
}
Asked
Active
Viewed 76 times
1

Daniel B
- 8,770
- 5
- 43
- 76

Nazeer ahmed khan
- 11
- 2
-
Especially the second answer from that duplicated question is what you are looking for. Hint: class names start Uppercase in Java. Always. – GhostCat Dec 14 '16 at 07:15
1 Answers
0
To call a method in an object's parent class, you can use the 'super' keyword.
Ex. super.show();

Jacob G.
- 28,856
- 5
- 62
- 116