Any one can explain how the inerface uses in java. give with
example.
Answer / yogesh sanas
Interface is a contract between class and interface. Interface has some public abstract methods which class needs to be implement.
We can achieve polymorphism using Interface.
e.g.
Interface Interface_Name(){
int add(int x, int y);
}
Class MyClass implements Interface_Name{
public int add(int x, int y){
return x+y;
}
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Difference between operator overloading and function overloading
0 Answers Tavant Technologies, Virtusa,
What does jenkins do?
What are the types of literals?
Name the methods that used to get and set the text label displayed by a Buttonobject?
What are command line arguments?
What makes a function well defined?
how to make a un-checked exception as a checked exception one.
Is null a string or object in java?
How can we get one Interface methods whit out using implementation of interface
What is qualitative variable?
How you can force the garbage collection?
What is the method in java?