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

Where we write javascript code in html page?

819


How do you compare objects in java?

711


What is the scope or life time of instance variables?

893


how come we know the object is no more used in the class?

6016


How will you invoke any external process in java?

854


What is the use of toarray () in java?

805


What is serialization in java?

818


What is singletonlist in java?

724


What is the benefit of singleton pattern?

763


What is the difference between JDBC 1.0 and JDBC 2.0?

2935


Explain notify() method of object class ?

875


What is function overriding and overloading in java?

829


Which keyword specify that a variable is effectively final ?

788


Explain the scope of a variable.

862


Is java util regex pattern thread safe?

763