Abstraction In Java 2

in Hindi - Abstraction In Java 2



not yet

Source Code :

RUNabstract class Shape{  

Shape(){
System.out.println("class is Shape");}  
abstract void show();  
void display(){
System.out.println("Shape is a class");
}  
}  
  
class Square extends Shape{  
void show(){
System.out.println("Shape is Square");
}  
}

class Demo2{  
public static void main(String args[]){  
Shape obj = new Square();  
obj.show();  
obj.display();  
}  
}