File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes using superclass constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using superclass constructor" Watch "using superclass constructor" New topic
Author

using superclass constructor

nirjari patel
Ranch Hand

Joined: Apr 23, 2009
Posts: 357

My question is, if I want to call super constructor outside of GraphicalDice constructor, can I do that ?

Thanks
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
A constructor can only be called from another constructor. And a further restriction is a constructor can only be called from the first line of another constructor.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Why would you like to invoke the super constructor from another location?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: using superclass constructor
 
Similar Threads
this() and super()
super().this()!
SCJP certification
Question regarding Inheritance
Must subclass call constructor of super class