Can I use "this" to call a private method from a method of the SAME class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can I use "this" to call a private method from a method of the SAME class?

Can I use "this" to call a private method of a class from another method of the SAME class??

8th Nov 2016, 3:08 PM
Arnie
Arnie - avatar
2 Answers
+ 1
yes you can!
8th Nov 2016, 4:20 PM
Maurizio Urso
Maurizio Urso - avatar
0
Just to be sure. A method in a class can call a method in the same class without referring to an object, is it right?
8th Nov 2016, 7:32 PM
Arnie
Arnie - avatar