what is the difference between abstract class and
Interface?where we can use it in realtime projects?
Answer Posted / kala
1) if the class is abstract. this class con't instatiate any
object. if we that class implemented with interface, we can
instatiate object with respect interface methods.
2) if we extend that particular abstract class, we must be
implemented all those abstract methods in that class.
otherwise it will automatically become abstract class. in
interface, if we implements the interface not compalsory
implemented, we can use those class ref.
| Is This Answer Correct ? | 47 Yes | 36 No |
Post New Answer View All Answers
Explain notifyall() method of object class ?
What is listnode in java?
What is natural ordering in java?
What is a java applet? What is an interface?
How to create an interface?
How do you sort a set in java?
What is static import in java?
Explain inner classes ?
What is a method vs function?
Can we declare the main method of our class as private?
Why char array is preferred over string for storing password?
What is the relationship between class and object?
how do I create a runnable with inheritance? : Java thread
How do you invoke a method?
What is string in java? String is a data type?