Proxy > Gmail Facebook Yahoo!

JAVA program to demonstrate Abstract class example



abstract class Abs
{
 abstract void display();
}
class B extends Abs
{
 void display()
 {
  System.out.println("Hello");
 }
}
public class A {
 public static void main(String args[])
 {
  B objB = new B();
  objB.display();
 
 }
}
 
In the above program, the display() function in class B completes the display() 
function in abstract class A.  


Responses

0 Respones to "JAVA program to demonstrate Abstract class example"


Send mail to your Friends.  

Expert Feed

 
Return to top of page Copyright © 2011 | My Code Logic Designed by Suneel Kumar