Untitled
Anonymous
java
12/04/2021 8:38 AM
632 B
25
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...