Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parent {
- int num;
- }
- class Child extends Parent{
- super.num = 12;
- void display(){
- System.out.println("k="+ super.num);
- }
- }
- class Main{
- public static void main (String args[]){
- Child obj = new Child();
- obj.display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement