View RSS Feed


Threads in Java. Java multithreading examples.

  1. Processes vs Threads

    by , 01-08-2012 at 01:10 PM
    Thread is a single execution in a process as compared to process which is an execution of a program. A process may have multiple threads within it. Also a thread is sometime referred as lightweight process. All the threads in JVM share heap that belongs to the process. In this case, different threads can access same object. Threads always share the heap and contain their own stack to store local variables. In this way threads are kept thread-safe and are synchronized.

    Name:  62.JPG
Views: 4309
Size:  26.7 KB