Emertxe-News & Blog

Home » Programming » Multithreading in Java : A practical view
Multithreading in Java : A practical view

This article explains what threads are in Java. It elaborates on their uses and on how to implement multi-threading in Java.

multithreading in java, thread and process difference, programmingIn a multitasking environment, having multiple threads helps the programmer to create efficient programs. In the context of Java, thread means two different things: ƒƒ

An instance of java.lang.Thread

A thread of execution

An instance of a thread is just an object like any other object in Java. It has variables and methods, and lives and dies on the heap, but a thread of execution is an individual process (a lightweight process) that has its own stack. In Java, there is one thread per stack or vice versa. Even if you don’t create any thread in your program, there is a thread running in your program, by default, which is called the Main thread. The main() function of Java or the starting point of a Java program runs in the Main thread, or we can say that the Main thread controls the execution of the main() function of a Java program.

Here is an article that appeared on Open Source For You (OSFY) February 2015 edition that does a deep dive into Multithreading in Java.

http://www.emertxe.com/content/osfy_feb_2015_vikash_multi_threading.pdf

Have a look into the article and let us know what you think.

Best Embedded systems training institute with placements in Bangalore.

YOU MAY ALSO LIKE

Online Free IoT Internship for Engineering Students – 2023

Online Free IoT Internship for Engineering Students – 2023

The Internship Ecosystem An internship is a type of professional learning opportunity where engineering students get practical work related to their field of study or career interest. Through an internship, a student can explore and advance their career while...

1 Comment

  1. suresh

    Its not called deep dive, rather brief dive….

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *