In which case i can go for Anonymous class?

Showing Answers 1 - 6 of 6 Answers

Sneha

  • Nov 30th, 2005
 

Anonymous class is a localclass with out a name.

An anonymous class is defined and instantiated in a single succinct expression using the new operator.

  Was this answer useful?  Yes

Kiran

  • Dec 16th, 2005
 

Hi....

Ananymous classes are useful when you want to extend more than one class at a time (Java doesn't support )and also it doesn't require next time.

Ex: Frames with ananymous classes for handiling the events with in a same program.

  Was this answer useful?  Yes

nick

  • Jan 9th, 2006
 

When we need to instantiate the class at the time of declaration, we can use anonymous class. There will not any constructor of anonymous class be provided since the class has NO name.

  Was this answer useful?  Yes

peddaraju

  • May 27th, 2006
 

      whenever we r implementing the keyevents,mouseevents at the time we r implementing all the methods with in that interface , Bcoz we r using Anonymous inner classes what ever methods  we want we can implement it.

any wrong plz mail: send2kpraju@yahoo.com

  Was this answer useful?  Yes

raju

  • May 27th, 2006
 

whenever we r implementing the keyevents,mouseevents at the time we r implementing all the methods with in that interface , Bcoz we r using Anonymous inner classes what ever methods  we want we can implement it.

any wrong plz mail: send2kpraju@yahoo.com

  Was this answer useful?  Yes

amit saini

  • Jan 8th, 2007
 

Inner class

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions