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 flag and how does it work?
Difference between class#getinstance() and new operator ?
What methods are used to get and set the text label displayed by a button object?
What is the use of coding?
Explain heap sort?
In which language java is written?
What is a string what operation can be performed out with the help of a string?
Which is bigger double or float?
What do you mean by mnemonics?
What about interthread communication and how it takes place in java?
What does math floor () do?
What is the size of int in 64-bit jvm?
List the features of java programming language.
Can finally block be used without a catch?
What is an eror in java?