when to use abstract class and when to use interface?
Answer Posted / brijendra kumar soni(xavient)
1-By using Interface we can achieve the Multiple
inheritence while by using abstract class we can not
achieve.
2-Abstract Class extended by a class only while Interface
implmented by a class and extended to one or more
interfaces.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the size of int in 64-bit jvm?
Which programming language is most secure?
what is use of functional interface in java 8?
What interface is extended by awt event listeners?
Can we create object of static class?
What is the best definition for data?
What is the method overriding?
What do you mean by stream pipelining in java 8?
Which class represents the socket that both the client and server use to communicate with each other?
Why can't we use static class instead of singleton?
What is this () in java?
Can I import same package/class twice?
How to make a non daemon thread as daemon?
What are the ways in which a thread can enter the waiting state?
What is string array?