Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using superclass constructor

 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Thanks
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you like to invoke the super constructor from another location?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic