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 |
Explain the difference between scrollbar and scrollpane?
How many unicode characters are there?
What is appletviewer?
Why is java not 100% pure oops?
Why does abstract class have constructor?
What are java packages?
What are the three best choices for a development environment?
What does exp mean in math?
can we have virtual functions in java?
What is meant by event handling in SAX parser?
How can we use primitive data types as objects?
What is vector capacity in java?