what is main difference b/w abstract class and interface
Answer Posted / priyabrata patro
listen in fact, java supports three types of structure. And they are fully implemented structure , fully unimplemented structure and partially implemented and unimplemented structure .
Now what is abstract class?
abstract class is one type of structure where exactly you can find both implemented and unimplemented method.I mean to say here it is partially implemented and unimplemented structure.So , usage of this class is to allow subclass to fullfill his own requirement by overriding abstract method defined in abstract class.And if you want to know complete information about abstract class you can contact to me in this email id priyabrata.try@gmail.com.
Now what is interface ?
interface is fully unimplemented structure where only unimplemented methods can be found out.And purpose to use this interface is to achieve run time polymorphism .
Now you will tell me that(run time polymorphism) also can be achieved by abstract class . Obviously , you can but you can not create object of interface but you can create object of abstract class by subclass (if it is a class).
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How does a cookie work in Servlets?
Can an interface implement another interface?
What is the difference between form & report?
What does this () mean in constructor chaining concept?
What is final method in java?
When is update method called?
Can you override static methods?
What is regex java?
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
is there a separate stack for each thread in java? : Java thread
What technique can be employed to compare two strings?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
Can java list contain duplicates?
Which are the two subclasses under exception class?
What data type is true or false?