What is the differances between a abstract calss and
interface
Answer Posted / porchelvi .a
ABTRACT CLASS:
-------------
• It can not be instantiated
• It allow us to specify all access modifier except
Private
• A class inheriting this must implement all of its
abstract method
• A class can inherit only one abstract class at a
time.
• Abstract class can add more functionality with out
destroying child classes that were using old version.
• We can declare the following
1. Fields
2. Constructors
3. Static Constructors
4. Static Functions
5. Concrete Functions
INTERFACE :
---------
• It can not be instantiated
• It allows only public Access modifier
• A class implementing interface must provide body
for its entire member.
• A class can implement more than one interface at a
time.
• Adding of additional functionality will have an
effect on its child class due to the necessary
implementation of interface methods.
• We can not declare the following
1. Fields
2. Constructors
3. Static Constructors
4. Static Functions
5. Concrete Functions
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Can we override main method?
Prepare me a program for the animation of train
What does sksksk mean in text slang?
State what is encapsulation and friend function?
Write a program to reverse a string using recursive function?
What do you mean by Encapsulation?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
What is abstraction example?
What is inheritance in simple words?
Why is abstraction used?
What type of loop is a for loop?
Why do pointers exist?
Why is static class not inherited?
What is meant by oops concept?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.