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


Please Help Members By Posting Answers For Below Questions

What is the types of inheritance?

604


What is overriding in oops?

606


What is the difference between abstraction and polymorphism?

617


What is a function in oop?

633


What are the three main types of variables?

600






what is the 3 types of system development life cycle

2435


what is difference between class template and template class?

2159


Advantage and disadvantage of routing in telecom sector

790


How do you explain polymorphism?

592


How to hide the base class functionality in Inheritance?

640


What is polymorphism oop?

623


What is encapsulation example?

549


What does sksksk mean in text slang?

1537


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2036


What is the significance of classes in oop?

590