/*
inheritance example java
*/
class First
{
void show()
{
System.out.println("This is parent class method");
}
}
class Second extends First
{
}
class JavaInheritanceExample {
public static void main(String args[])
{
Second mitesh = new Second();
mitesh.show();
}
}
inheritance example java
*/
class First
{
void show()
{
System.out.println("This is parent class method");
}
}
class Second extends First
{
}
class JavaInheritanceExample {
public static void main(String args[])
{
Second mitesh = new Second();
mitesh.show();
}
}
0 comments:
Post a Comment