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
What is the use of inner class?
What are methods and how are they defined?
What is the difference between final, finally and finalize() in java?
How many bits are in a sentence?
How much ram can a 64 bit processor theoretically?
Is map ordered in java?
How to declare an arraylist in java?
What is java in simple terms?
23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an
What is method in java ?
For class CFoo { }; what default methods will the compiler generate for you>?
What are "class access modifiers" in Java?
Write a java program to check if a number is prime or not?
What is method overloading in java ?
How many types of gc are there in java?