This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

this argument question

 
Arnold Tieu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new to this site..Please help me with the question below...
What does "this" references. For example
synchronize( RAndomCharacters.this )
and
RandomCharacters.this.wait();
and
this.a
I am confused by all these...
[ February 24, 2003: Message edited by: Arnold Tieu ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arnold,
this references any object created by new HelloAnimThreadFirst() or any other constructed object for that matter. The code you posted is incorrect because the line new Thread(this) would have to be inside the class.
Michael Morris
[ February 24, 2003: Message edited by: Michael Morris ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic