Forums Register Login

using superclass constructor

+Pie Number of slices to send: Send

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

Thanks
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Why would you like to invoke the super constructor from another location?
What are your superhero powers? Go ahead and try them on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1033 times.
Similar Threads
Must subclass call constructor of super class
Question regarding Inheritance
SCJP certification
super().this()!
this() and super()
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 05:13:30.