How a class can implement an interface?
Answers were Sorted based on User's Feedback
Answer / asrinivas rao
In java a class can implement interface using "implemnts"
keyword.the methods defined in the interface need to be
implemented in the class which implments the respective
interface,otherwise the class becomes has an Abstract class.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ranganathkini
A class can implement an interface by using the "implements"
clause followed by a list of interface names that it
implements. Then the class needs to implement the
interface's methods within its class body.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mayuri wankhade
without using implements clause it is also possible to use
interface by creating object of an interface in the class
containing main method like :
nameOfInterface Obj = new nameOfInterface()
{
implement a method declared in an interface
};
Obj.MethodName();
| Is This Answer Correct ? | 0 Yes | 0 No |
What is jpa specification?
What is meant by string is immutable?
What is a class ?
Explain about the select method with an example?
When we r go to abstract class and when we go to Interface? i have confusion this question while in interview plz clarify
What is the difference between Error, defect,fault, failure and mistake?
Difference between the paint() and repaint() methods?
justify c is portable
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?
Can we clone singleton object?
How to find the index of the largest number in an arraylist java?
What is the difference between variable & constant?