Java Classes Question:

Tell me Is it possible to declare an anonymous class while implementing an interface?

Java Classes Interview Question
Java Classes Interview Question

Answer:

Interface i = new Interface(){/* Code}The above statement creates an instance of a class which implements the Interface "Interface". As name of class is not specified hence it is anonymous.


Previous QuestionNext Question
Explain what does enumeration means when talking about the 9th AmendmentIn this example class-var = new classname( );
The classname is the name of the class that is being instantiated.

A) True
B) False