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 ...
Abstract classes: They are modeled with their names in italicsStatic Members: They are modeled with an underline ...
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 ...
it shud b (B)extendsbecos all remaining options tell the type of class or data....whereas extends implies extracting property of superclass ...
Interace is used when you need 100 % abstraction and this abstraction is used in whole application. While in abstract class abstraction is very depending on how many methods you made abstarct and abstract class is for specific module. Which other ...
Abstract calss may have both concrete methods(abstract method) and non abstract methods. But it should contain atleast one abstract methods.All the methods in interface are abstract method by defaultly.non abstract methods are allowed. ...
What is the difference between putting a class as abstract or if any of method in class is declared as abstract diference of these two while extending these two types of classes
A programmer writes an abstract class with common features and methods which will be implemented differently in different subclasses.The same programmer will provide subclasses to the abstract class.A programmer writes an interface when all the features ...
Hai,an abstract class cant contain a private constructor bcs, as the abstract class is to be subclassed and when the object of the subclass is created the constructor of the super class is called and for this mechanism to be done the superclass's(the ...
Hi,Answer:Interface :Interface is having Abstract methods only(i.e no implemention for that method).Any one(Class) can provide implementation for that methods.Interface can be used for multiple inheritance.Abstract ...
View page << Previous 5 6 7 8 [9] 10 11 12 13 Next >>

Go Top