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

Which is easier netbeans or eclipse?

611


Can private class be extended java?

571


How will you call an Applet using Java Script Function?

544


What is the benefit of singleton pattern?

529


Explain about complier design(phases)

628






What happens if main method is not static?

495


What is the purpose of the enableevents() method in java programming?

586


Can we create a class inside a class in java?

550


What is run time allocation?

579


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1605


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

600


Which is illegal identifier in java?

590


What is null data type?

538


How do you declare an array in java?

522


What is a function easy definition?

529