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

Does collectionutils isempty check for null?

1119


Does the order of public and static declaration matter in main method?

842


How do you join strings in java?

756


Is null == null in java?

856


Can we extend immutable class?

763


How do you sort in java?

779


What is mvc in java?

790


Explain access modifiers in java.

783


What are the differences between throw and throws?

842


How hashmap increases its size in java?

720


Difference between method overloading and method overriding in java ?

788


What is the tradeoff between using an unordered array versus an ordered array?

922


When should I use stringbuffer?

786


How will you print number in reverse (descending) order in BST.

770


what is the difference between Object Based Language and Object Oriented Language?

793