when to use abstract class and when to use interface?
Answer Posted / jc
If you want give different implementation(behaviour) to
methods which are available in the interface go for
interface.
If you want give different implementation to particular
methods(that is only some methods which are not similar to
subclass)go for abstract class.
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
Define an applet in java?
Describe method overriding
Difference between start() and run() method of thread class?
Differentiate between stringbuffer and string?
How do you get length in java?
What are the 8 primitive data types in java?
What is serialization in java?
What is difference between fail-fast and fail-safe?
What is public/private protected in java?
What is math floor in java?
What is the static method?
I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?
What is meant by distributed application? Why are we using that in our application?
How many characters is 2 bytes?
What is return used for in java?