can you create interface instance ?
Answer Posted / anil
That it is not creating the instance of the interface. The
class which is there on the right side is called anonymas
call.
It is correct when the statement is as below
Test t =new Test(); he should give the ';' after the
paranthesis not after the '}'.
Please refer anonymas classes for other information how
they works...
| Is This Answer Correct ? | 37 Yes | 1 No |
Post New Answer View All Answers
What is java jit compilers?
What is an infinite loop? How infinite loop is declared?
Is singleton set an interval?
How do you trim a space in java?
Can a source file contain more than one class declaration?
What is "this" keyword in java? Explain
How to perform merge sort in java?
What is java and its types?
What is a class variable?
How do you reverse sort a list in java?
If a class is declared without any access modifiers, where can the class be accessed?
Can we define private and protected modifiers for the members in interfaces?
Is null a keyword in java?
When should I use singleton?
What is difference between call by value and call by reference?