As TestThread is used in this example program, there will be no race conditions. But as a generally Thread-safe class, I'd actually say TestThread fails because its member variable "number" is not private. Multiple threads could access that member in an unsynchronized way.
You might call this a small detail, but in a real program, this is where threading problems come from.
This isn't strictly necessary once you made number private, but I'd also remove the initialization to "-1" and declare it as final. It not better communicates intend, but also decreases of likeliness of bug injection due to later modification of the code.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Don't get me started about those stupid light bulbs.