Can a class extend abstract class or interface? why
Answer Posted / abhay bhatia
a class can extend an abstract class and can implement an
interface, why is because even though an abstract class
provide default implementation of its methods, we cannot
instantiate an object of the abstract class and therefore
need a class that extends it to use the instance methods of
this abstract class. An interface on the other hand cannot
even have default implementation, therefore it has to be
implemented to be used
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the difference between a method and a function in alice?
What is the use of callablestatement?
What is the purpose of garbage collection in java, and when is it used?
Is a method a procedure?
Can private members of a base class are inheritable justify?
What modifiers are allowed for methods in an interface?
What is difference between adapter class and listener?
How can we make sure main() is the last thread to finish in java program?
What is static block?
Will minecraft java be discontinued?
Which types of exceptions are caught at compile time?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
Which is dependent variable?
What is factor r?
Can I overload to string method