File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
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.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Is it possible to create a constructor for anonymous inner class
Q: Anonymous inner class extending outer class
does an anonymous inner class have constructor?
Initializing instance variables in java
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-2014