What is multithreading? tccicomputercoaching.com

Page 1

What is multithreading? tccicomputercoaching.com Multithreading in java is a process of executing multiple threads simultaneously. A thread is a lightweight sub-process, or the set of processing. In simple words we can say that we divide one process into smaller processes. Let's try to understand: one man takes 50 day to build a house completely. But if we employee 10 men to work concurrently then it can be done within 5 days, exactly same threads done the performances.

Multiprocessing and multithreading, both are used to achieve multitasking. To implement thread in Programme we can extend Thread class or implement Runnable interface. Let me explain with one example class Mythread extends Thread { public void run() { System.out.println("Child Thread");

}


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
What is multithreading? tccicomputercoaching.com by Rosario Riley - Issuu