View RSS Feed

My Java Tips

  1. main() thread in Java

    by , 11-13-2011 at 10:44 AM (My Java Tips)
    The 'main()' method in Java is referred to the thread that is running, whenever a Java program runs. It calls the main thread because it is the first thread that starts running when a program begins. Other threads can be spawned from this main thread. The main thread must be the last thread in the program to end. When the main thread stops, the program stops running.


    Main thread is created automatically, but it can be controlled by the program by using a Thread object. The Thread ...
    Categories
    Java SE
  2. Threads In Java

    by , 11-08-2011 at 06:43 PM (My Java Tips)
    Threads are small processes that are part of a larger process. A single process may have many threads and even if one of these threads is waiting for input from the user or is blocked or is carrying out a lengthy process, the rest of the threads can continue. An example of this can be a word processor which is a process with many threads such as the spell checker, the grammar checker, the user typing area etc.In Java, thread is just the path of execution.
    In Java, threads are created by two ...
    Tags: sleep, thread Add / Edit Tags
    Categories
    Java SE