Win a copy of Functional Reactive Programming this week in the Other Languages 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