Abstract class can contain method definations also.Interfaces are essentially having all method prototypes no definitionIn short Interface is a abstract class having all methods abstract
Interface
All methods are abstract and there is no implementation.
No access modifiers are allowed.
Interfaces are essentially having all method prototypes no definition
We can achieve multiple inheritance through interface
Abstract class
Some ...
What is the diff between interface and abstract class?why interfaces?why packages?why abstract class?what is the diff between uncheked exception,checked exceptions?why jvm works internally?why java does not support pointers?what is diff bet callby value and call by reference in java?
Hi, Inferface can be used as a contract for other classes. ...
GenericServlet is an abstract class because its upto the user how he wants it to use the life-cycle methods of the servlet and also the server needs to make sure that all the life cycle methods of the servlets have to be implemented.So if a class is extending ...
Interface: In interface just signature of the methods are defined(means abstract meathod). there is no a single method which has body.e.g. void add();Abstract class: In a abstract class some method are abstract while some are concrete methods. we use ...
An abstract class is a class that cannot be instantiated and having atleast one abstract method(having no body).Only we can derive a child class from the abstract class ...
An abstract class cannot be used on its own but must be first inherited in the derived class. ...
we cant say here anything this depends on situation ...
If interface & abstract class have same methods & abstract class also not contain any implementation for those methods which one you prefer ?
use abstract class because we implement only requried methods of abstract class but for interface we must implement all methods whether or requried or not
No, I tried.A member 'ClassB.methodA()' marked as override cannot be marked as new or virtual. ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top