Answer Posted / paletipatisrinu
No we can instantiate interface directly.but we can create
instantiate of interface in directly
interface i1
{
public void wish();
}
public class A implements i1
{
public static void main(string...arg)
{
i1 o1=new A();
o1.wish();
}
public void wish()
{
System.out.println("we can create instantiate in directly");
}
}
Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
What is the indent key?
What is constructor in java ?
What is canonical name in java?
Define jre i.e. Java runtime environment?
What is the difference between Error, defect,fault, failure and mistake?
Why do we need variables?
What is a protected void?
How to retrieve data from database in java using arraylist?
Is a copy constructor?
What is the range of a character variable?
What is the purpose of using javap?
What is difference between float and double?
What is static synchronization?
What is ordered map in java?
Explain reverse a linked list recursive java solution?