can you create interface instance ?
Answer Posted / shanmukha
Hi,
We can't create instance for an interface or abstract
class.Just remove the following code from the program
written by Uday.
interface Test
{
public void wish();
}
Remove the above code and run the program,then program will
compile and execute properly,because he used anonymous class.
Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
What are examples of modifiers?
What modifiers may be used with an inner class that is a member of an outer class in java programming?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
Can list have duplicates in java?
Where are register variables stored?
What is a singleton class? Give a practical example of its usage.
What is blank final variable?
Can a class be private or protected in java?
Why do we use bufferedreader?
What exceptions occur during serialization?
What is a function in programming?
Is assembly language a low level language?
What Is Query Throttling in java?
What is internal variable?
Describe the various concepts related to object oriented programming (oop).