The real time environment , when do we go for abstract class and when do we go for interfaces , can any one please revert back in this regard?
- Abstract class contains one or more incomplete methods while an interface contains only the signatures of all the methods. ...
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?
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