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 ...
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 ...
Hi, No,we can't declare both final and abstract for the same method,B'coz if you declare method as abstract means we are declaring a method not actual a concrete method so we need to override in the subclass. If you declare the same method as ...
If there is a functionality (like employee) that is common across specific classes, then specific classes (Hourly Employee) can be inherited from the common class. What if there is no common functionality, but there is a common contract that classes have ...
View page << Previous 4 5 6 7 [8] 9 10 11 12 13 Next >>

Go Top