what is the difference between abstract class and
Interface?where we can use it in realtime projects?
Answer Posted / neha thakur
abstract class contains all abstract method or all concrete
method or combination of both. we can not directly create
object of abstract class.abstract class methods must
implemented in sub class.
interface contains declared method but does not contain body
of method.like abstract class we can not create instance of
interface.methods defined in interface are public &
implicity called as abstract method & interface must be
implemented in the classes with implements keyword which
contains implementation of methods
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is immutable data?
What is a java applet? What is an interface?
What is a “stateless” protocol ?
What is a qualifier in a sentence?
Can we print null in java?
What is a modifier?
What exactly is a .class file?
What is += mean in java?
What is difference between synchronize and concurrent collection in java?
Why stringbuilder is not thread safe?
Can list have duplicates in java?
What happens if an exception is throws from an object's constructor?
What is difference between char array and string?
How do you delete a list in java?
Explain, java is compatible with all servers but not all browsers?