Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How you return yourself ? 1

Status
Not open for further replies.

bernheim

Technical User
May 10, 2001
3
UY
Stupid student´s question:

What is the word to use when an object has to return itself in a function ?

I tried:
return self

It didn´t work. Thanks Gustavo.-
 
Many thanks pipk ! It worked very well.
Wouldn´t sound better self than this ? (More stupid a question than the first one).

Really appreciate your help.
Gustavo.-
 
probably, but don't forget that Java is based on C++, and the *this pointer is used extensively in that if you are doing things such as overloading operators etc.

It's a shame you can't overload operators in Java
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top