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
How does indexof work?
Can an integer be null java?
What is mean by exception?
What is scanner in java?
What are the types of java languages?
What are the restriction imposed on a static method or a static block of code?
What is the difference between yield() and sleep()?
What is balanced tree in java?
What does flag mean in java?
Can a static class implement an interface?
How do you declare a string variable?
What are the different types of data structures in java?
What do you mean by singleton class in java?
What is constructor and virtual function? Can we call a virtual function in a constructor?
What is an infinite loop?