How do you relate a Interface to a Class? Tell me in
Detail?
Answers were Sorted based on User's Feedback
Answer / s.thirunavukarasu
with the help of implementing interface,we can relate a
interface to a class.
for example
interface firstone
{
public void display();
}
class myprm implements firstone
{
public void disply()
{
system.out.println("welcome to java world");
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ranganathkini
A class relates to an interface, in that the class
implements all the methods of the interface.
The implementing class can eiether provide a concrete
implementation of the interface's methods or provide an
abstract implementation.
| Is This Answer Correct ? | 1 Yes | 0 No |
Is there a case when finally will not execute?
what is singlton class?where it is use in real time senario.
How to retrieve data from database in java using arraylist?
What is meant by object oriented programming – oop?
what is the use of abstract class?
3 Answers Amdocs, Atos Origin, Invictus,
What is oop in java?
Why string is not a wrapper class?
What are integer overflows and underflows and how to handle them?
Where are local variables stored?
What one should take care of, while serializing the object?
What is the biggest integer?
Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.