Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
I want to know if there any differences between the Python "self" method and Java "this"?

1 Answer

0 votes
by (108k points)

Technically both self and this are used for the same thing that is they both are used to obtain the variable connected with the current object. The only difference between them is, you have to incorporate self explicitly as the first parameter to a method in Python, whereas in Java you do not have to worry about pass the 'this' explicitly.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...