Difference between Abstract Class & Interface?
Answer Posted / rakesh.fanu
Abstract Class :-
Abstract class should be declare with abstract.
Abstract Class must be extended by its sub class.
Abstract Class has abstract method and also method with
body also.
Abstract Class has not instance variables , it contain only
Constant.
An abstract class cannot be instantiated
Interface :-
Interface must be Implemented by another class.
Interface has only abstract method.
Interface has not instance variables , it contain only Constant.
An Interface cannot be instantiated
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What's the difference between code-based security and role-based security? Which one is better? : java security
What is meant by code profiling?
Explain suspend() method under thread class>
What is cdi in java?
What is xml file in java?
What is transactional in java?
How can one prove that the array is not null but empty?
When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in java?
What is persistence xml in java?
How can c# app request minimum permissions? : java security
Can I use openjdk for commercial?
Is it better to learn java or python?
i have client interview in TCS.client is CITI BANK.how to face it,what type of questions they will ask,please tell send me to kumar525job@gmail.com
Why doesn’t the main method throw an error with no arguments?
Which framework is best for rest api java?