Thanks A.jyotsna,
Can u tell me differnce between abstract class and interface
vikash
Answer Posted / jyotsna gupta
Abstract Class | Interfaces
|
1. Starts with a class keyword | Starts with interface
| keyword
2. abstract modifier has to be | No need to provide abstract
provided | modifier (100 % Abstract)
3. Not necessary to contain | All methods are by default
abstract methods, but if a | public and abstract, and
class has abstract method | all attributes are public
then class has 2 be abstract| static, and final (FIELDS)
4. Used for group of related | Any class can implement
classes only | interfaces
5. Single inheritance is | Multiple inheritance can
allowed only | be achieved
6. All class behaviours are | Cannot have constructors,
allowed, except creating | should initialise its
objects of abstract classes | Fields
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Does substring start with 0?
What is length in java?
What is boolean false?
Are generics important java?
What are basic keywords?
how to create daemon thread in java?
Whats the difference between notify() and notifyall()?
What is finally in Java?
What is the static keyword?
Can a serialized object be transferred via network?
What is the synonym of procedure?
How do you sort arraylist in descending order?
What is the differences between c++ and java? Explain
What is collection class in java?
What are namespaces in java?