#"Super" keyword and inheritance

1 messages · Page 1 of 1 (latest)

vivid girder
#

.

fossil vaultBOT
#

<@&987246399047479336> please have a look, thanks.

fossil vaultBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

vivid girder
#

There's some small thing which I wanted to clarify, when we use "super", which is a reference to a non static instance, I assume that whether in the super-class or the child class, it all refers to the same instance which is currently being used? So if I had some field in the parent, some other field in the child, then objet1 has the field of both the parent and child of the current object being instantiated

tepid ridge
#
    super() //calls the constructor of class2
  }
fossil vaultBOT