can you create interface instance ?
Answer Posted / ramu
hey uday u r wrong
In your program you are not created obj for interface, you have given anonymous implementation for 'Test' interface and instantiated that anonymous class only but not the interface.
for conformation call getClass() on 't'.(t.getClass())
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a war file?
Can we use a default constructor of a class even if an explicit constructor is defined?
What value is a variable of the string type automatically initialized?
What are the 5 types of research methods?
how to handle exceptions in ejb?
What is class and object in java?
How many types of java are there?
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
What does it mean that a class or member is final?
Which collection allows duplicate values in java?
If you are given the name of the function at run time how will you invoke the function?
What method is used to specify a container's layout in java programming?
Is it possible to compare various strings with the help of == operator? What are the risks involved?
Define a package.
What is busy spin, and why should you use it?