Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Is it possible to create a constructor for anonymous inner class
Joined: Jan 08, 2008
Jan 18, 2008 02:13:00
Is it possible to create a constructor for anonymous inner class? If so, how?
***<br />K Vinod Reddy
Joined: Oct 15, 2007
Jan 18, 2008 02:49:00
No, you cannot have a constructor in an anonymus class, because you don't have the name of the class. Instead you can add an instance initialization block which acts like a constructor.
subject: Is it possible to create a constructor for anonymous inner class
Q: Anonymous inner class extending outer class
Initializing instance variables in java
does an anonymous inner class have constructor?
Can JPanel's paint() use different Graphics2D objects?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013