Thread: Java
View Single Post
  #2 (permalink)  
Old 07-29-2007, 12:01 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Quote:
Originally Posted by nogono View Post
What exactly do you mean by this syntax?

if(this.running!=running)
{

}
That means you have both instance variable of running and local variable of running. this.running refers to the instance of the running variable (outside of your method), while running is refers to the local variable.

For example:
PHP Code:
private int hello 1;
public void test() {
     
int hello 2;
     
System.out.println(this.hello); // printing 1
     
System.out.println(hello); // printing 2

Hope that helps

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote