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


Please Help Members By Posting Answers For Below Questions

Name the components that are termed to be Heavy-weight component but available in Light-weight components?

2076


What is parsing and its types?

661


What is replaceall in java?

650


Can you explain the cs option of java interpreter?

595


What is a parent class in java?

631






In Java list the methods that can be overridden?

667


What are variable names?

617


What is the association?

652


What’s the difference between constructors and other methods?

625


what is collatration?

2848


Give me example of derived data types.

703


Is this valid in java ? Can we instantiate interface in java?

641


When the constructor of a class is invoked?

681


What is instance example?

611


What is the current version of java?

638