Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Java : Interface Vs Abstract Class

Share this post!
 Vote this!

What is an Abstract Class?


A class defined in such a way such that it defines the basic structure of an object but does not provide any implementation details about at least one of its method. Any method in an abstract class which is devoid of any implementation details is called abstract methods. The specific implementation of each of those abstract methods is provided by its subclasses. An example of abstract class is as follows,-
Code:
abstract class A
{
    abstract void call( );
}
class B extends class A
{
    void call( )
    {
        system.out.println("Inside class B");
    }
}
more...

0 comments:

Post a Comment