admin

Threds: multiple call to run() method

You can call run() method of a thread many times. However, not a single new thread will be started. This way JVM will only execute the code from run() method. And this will not probably be what you tried to achieve.

Remember: to start a new thread, you need to call start() method, which among others, will execute run() method …

Java: main method declaration

It’s good to remember that there are a few ways of defining the main() method in Java 5:

public static void main(String[] args) {}

or

public static void main(String args[]) {}

or

public static void main(String... args) {}

Sometimes, we don’t care and remeber of basic stuff, which can result in worse score on the exam icon_smile-5323953