when to for abstract class and when to go for interface
Answers were Sorted based on User's Feedback
Answer / sumit kumar
if your class design have some common and some different
behavior then go for - abstract class
if your class design have only different behavior then go
for interface.
| Is This Answer Correct ? | 12 Yes | 2 No |
How does hashset works in java?
Can you start a thread twice in Java?
What are the differences between the constructors and methods?
What do you mean by pointer value and address?
does java support pointers?
Are primitives objects?
what are the analysis of an object
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
How to excute - Interface - Inner class- method can any one tell how to execute/ call this main method public interface abc { static int i=0; void dd(); class a1 { a1() { int j; System.out.println("inside"); }; public static void main(String a1[]) { System.out.println("in interfia"); } } }
what is the difference between Object Based Language and Object Oriented Language?
Is a char always 1 byte?
Can classes declared using the abstract keyword cab be instantiated?