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
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
What are the different ways of creating thread?
what methods would you overwrite in java.lang.object class?
How do you create a sop?
Explain the public class modifier?
What is the purpose of default constructor?
Is char a method in java?
Can you pass functions in java?
What are the two types of streams offered by java 8?
Differentiate between == and equals().
What are some alternatives to inheritance?
What is difference between core java and java ee?
What do you understand by the term polymorphism?
What is the exact difference in between Unicast and Multicast object?
What is the static method?