I don't understand what this
keyword reference in this example:
public class Game extends Canvas implements Runnable{
/* some code.. */
private Thread thread;
private boolean running=false;
private synchronized void start(){
if(running) return;
running = true;
thread = new Thread(this,"Thread");
thread.start();
}
}
First, I thought it could be written as : thread = new Thread(new Game(),"Thread");
but it doesn't work.