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
Which data type is class in java?
What are new features introduced with java 8 ?
What is difference between core java and java ee?
What is a hashmap used for?
What is unicode full form?
What is nextint java?
What is treeset in java?
What is main in java?
Can the interface be final?
Why are lists ordered in java?
When will we prefer to use set and list in java and why?
What is the purpose of file class?
In Java list the methods that can be overridden?
How do you make an arraylist empty in java?
What is a "pure virtual" member function?