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
How do you reverse sort a list in java?
What is fail first in java?
Can we convert list to set in java?
Explain thread life cycle in java?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
How many bits is a char?
how can you catch multiple exceptions in java?
What does singleton class mean?
Can a top level class be private or protected?
Why do we need data serialization?
What is purpose of keyword void?
Differentiate between a constructor and a method? Can we mark constructors final?
can java object be locked down for exclusive use by a given thread? : Java thread
What is the difference between the direct buffer and non-direct buffer in java?
what is thread? What are the high-level thread states? : Java thread