What is Multithreading?

What is Multithreading? Explain how Java supports programming for multitasking environment.

A thread is one of the processes of an application. In multithreading, an OS allows different threads of an application to run in parallel.

The multitasking environment can execute in two ways.

1. Process based multitasking
2. Thread based multitasking

Process based multitasking – Process based multitasking is when two different processes, running at different locations, execute simultaneously.

Example: A user can write some text using editor and simultaneously play music.

Thread based multitasking – A thread is the smallest unit of a dispatchable code.
Two different tasks like printing a document and editing it simultaneously can be done in a thread based multitasking environment.
Threads can be implemented in Java using the Thread Class.
The threading concept says that the different blocks of the same program can be executed concurrently.
Types of Beans
Describe the types of Beans - Stateless Session Beans, Statefull Session Beans, Entity Beans......
Explain the Common use of EJB
Explain the Common use of EJB - The EJBs can be used to incorporate business logic in a web-centric application......
What are transaction isolation levels in EJB?
What are transaction isolation levels in EJB? - Transaction_read_uncommitted, Transaction_read_committed, Transaction_repeatable_read......
Post your comment