Interfaces are used when we have to develop distributed applications or when we need to implement multiple inheritence. While abstract classes will be used when we need to develop a standalone application. ...
An abstract class may not be declared as final.
A compile-time error occurs if a class is declared both final and abstract, because the implementation of such a class could never be completed ...
No,when you declare a abstract method in a class then you have to declare that class as abstract,so that the sub class of that class can implement it.But when you declare a class as final that means you cann't extend it further,so if you now declare a ...
You can extend only one class.Abstract classes support single inheritance. ...
Interface must have an abstract method. Interface have no access modifers. Interface used to define the method and members. Abstract class is class. it has access modifiers. Abstract class cannot be instantiated but it can be ...
You are creating a web application for an online product ordering system. You will be using data from several different databases and to reduce the load on the databases you have decided to use connection pooling. You have a ConnectionPool class and you want one pool for each database however you will have to connect to a variable number of databases. What pattern should you use?A Abstract factory B Factory Method C Builder D Prototype E Singleton
Answer: E
Inteface is concidered to be a best practice to use then Abstract(Template) Desing Pattern.Inderface is more flexible is also forcess to maintain same code for Similar Objects but Abstract objects do the same. Abstract objects are based on Inheritance. ...
Does an abstract class can contain sealed methods? Can we create an abstract class without abstract methods?
Abstract class contains both concrete methods and also abstract methods,whereas interface contains only abstract methods ...
Interface - has only declarations, no objects are created.abstract class - sub class must extend this, objets can be created ...
View page << Previous 4 5 6 7 [8] 9 10 11 12 13 Next >>

Go Top