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
What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?
what are abstract functions?
Explain public static void main(string args[]).
What does += mean coding?
Explain about map interface in java?
What is the purpose of garbage collection in java, and when is it used?
Which collection is best for sorting in java?
What is Applet Stub Interface ?
Can we overload the constructors?
What is java autoboxing?
How concurrent hashmap works?
Which collections are thread safe in java?
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
What classes of exceptions may be thrown by a throw statement?