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 |
Can we declare Pointer in Java?
Explain methods specific to list interface?
I have a class which is abstract which contains only the abstract methods. This is similar to an interface. Then, if i have given a choice to choose one of them. Which one i have to choose and why?
State some advantages of java?
Is java jre still free?
what is a thread pool in java and why is it used?
What is a method declaration?
Give few examples of final classes defined in Java API?
In how many ways we can the thread? in java
what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
What are different types of arrays?
What is the purpose of format function?