This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
1. The first q (this.q) is the member variable declared in line 2. The second q is the argument variable from line 4. So, you're setting the member variable to the value of the argument variable.
2. An object is instantiated. Why do you think there isn't? (A variable is not the same as an object). There's no variable, instead the start() method is called directly on the new Thread object. This code does exactly the same as:
The second approach is what you need to do if you want to keep a reference to the new object. With the first approach you create a new object, but you can't then call any methods on it later in the method.