What is anonymous class?

Answer Posted / niranjanravi

An Anonymous class is a class which is defined at run time
without having any name and it is instantiated and declared
at the same place.
Syntax:
new class classname(){}
new interface interfacename(){}
Keyword extends and implements are usedin this class.
It is always implicitly final.
It is never static or final.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

8615


What is the file type?

551


How do you replace all in word?

518


Define reflection.

572


what type of questions asked for barclays technologies pune please send urgent

5225






What is the use of arraylist in java?

520


How can you write a loop indefinitely in java programming?

547


How to use Media tracker Class.

640


Can we override compareto method?

496


Can you extend main method in java?

614


Does list allow duplicates in java?

514


Can a main method be declared final?

579


How does multithreading take place on a computer with a single cpu in java programming?

522


Write a program to print all permutations of string?

673


Can we clone singleton class in java?

509