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
In case of inheritance what is the execution order of constructor and destructor?
What is the purpose of object oriented programming?
What is flush buffer?
What is the difference between serializable and externalizable interfaces?
How do you declare an array that will hold more than 64KB of data?
What is the purpose of main function in java?
What is numeric data type?
What are basic data types?
Difference between final and effectively final ?
What is a boolean expression in java?
Is set sorted in java?
What does string mean in java?
What data type is string java?
How will you get the platform dependent values like line separator, path separator, etc., ?
Explain scope or life time of local variables in java?