Untitled
unknown
java
4 years ago
474 B
10
Indexable
package com.company;
import java.util.*;
class Parent {
    void show(){
        System.out.println("This Is parent Class\n");
    }
}
class Child extends Parent{
    void show_2(){
        System.out.println("This is child class\n");
    }
}
class Main {
    public static void main(String[] args) {
        Parent obj= new Parent();
        Child obj2 = new Child();
        obj.show();
        obj2.show_2();
        obj2.show();
    }
}Editor is loading...