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


Please Help Members By Posting Answers For Below Questions

How does a cookie work in Servlets?

341


Can an interface implement another interface?

570


What is the difference between form & report?

586


What does this () mean in constructor chaining concept?

556


What is final method in java?

537






When is update method called?

668


Can you override static methods?

502


What is regex java?

556


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

1662


is there a separate stack for each thread in java? : Java thread

535


What technique can be employed to compare two strings?

569


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

610


Can java list contain duplicates?

574


Which are the two subclasses under exception class?

526


What data type is true or false?

571