Java - How Many Thread Would be Run

Whatever "extends Thread" or "implements Runnable", it just says the object can be run on multithreading, therefore, how many thread would be created is based on how many constructor of the thread is run.

In an addition, should concern how many thread creation there, and the thread should not be for small section of code. If too many there, the computer would be overload. If too few, the performance would be not good.

Thread
Object o1 = new Object();
Object o2 = new Object();

o1.start();
o2.start();
Runnable
Thread t1 = new Thread(new Object());
Thread t2 = new Thread(new Object());

t1.start();
t2.start();
Reference
  • http://oreilly.com/catalog/expjava/excerpt/index.html