INTERVIEW QUESTIONS
J2EE
CORE JAVA
DETAILS
Question: Can we create an object for an interface?
Answer: Yes, it is always necessary to create an object implementation for an interface. Interfaces cannot be instantiated in their own right, so you must write a class that implements the interface and fulfill all the methods defined in it.
|
Question:
Can we create an object for an interface?
Answer:
Yes, it is always necessary to create an object implementation for an interface. Interfaces cannot be instantiated in their own right, so you must write a class that implements the interface and fulfill all the methods defined in it. Source: CoolInterview.com
NO, Instance of an interface can not be creted however refrencing can be possible Source: CoolInterview.com
Answered by: Vishal Parihar | Date: 12/4/2009
| Contact Vishal Parihar
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|