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
Why should we use singleton pattern instead of static class?
What is the old name of java?
What is a boolean used for?
What is generic class?
Explain about core java?
What is the purpose of using the java bean?
What is enhanced loop in java?
Detail discussions on JVM, memory management and garbage collector.
What is the difference between scrollbar and scrollpane?
What is the difference between stream and buffer?
Can we make main() thread as daemon?
What does percent mean in java?
Can we overload the methods by making them static?
Is java a software?
How is java hashmap implemented?