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 a nested structure?
What is the difference between path and classpath variables?
Tell me the latest versions in java related areas?
How do you compare two strings lexicographically?
What is the gregoriancalendar class in java programming?
What are peerless components?
What is composition in java?
What is array size in java?
What do you meant by active and passive objects?
Can we define static methods inside interface?
Which programming language is most secure?
Is singleton set an interval?
What are the steps involved to create a bean?
What is the major advantage of external iteration over internal iteration?
What do you understand by private, protected and public?