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 nextline method in java?
What is lastindexof in java?
Can a static class implement an interface?
Define reflection.
Can a boolean be null java?
Why do people says “java is robust”?
Give me an example of array and linked list? Where they can be used?
What is the requirement of thread in java?
What is a memory leak in java?
What is the difference between checked exception and unchecked exception?
What is boolean in java?
What is nested loop? What is dangling else condition in it?
how does the run() method in runnable work? : Java thread
Is array passed by reference in java?
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?