I'm a beginner to coding and I recently learned about this
and toString()
. I'm not exactly sure what this
is and what it does. Can someone explain it in simple words?? Also, when do I have to use it and when do I not?
One more question, why don't we have to use this
in the toString()
method if we already used it in a constructor
?
Thank you so much