answersLogoWhite

0

Java provides built-in support for multithreaded programming. A multithreaded program contains two or more parts that can run concurrently. Each part of such a program is called a thread, and each thread defines a separate path of execution.

A multithreading is a specialized form of multitasking. Multitasking threads require less overhead than multitasking processes.We achieve multithreading in Java by following this steps...

  • New: A new thread begins its life cycle in the new state. It remains in this state until the program starts the thread. It is also referred to as a born thread.
  • Runnable: After a newly born thread is started, the thread becomes runnable. A thread in this state is considered to be executing its task.
  • Waiting: Sometimes a thread transitions to the waiting state while the thread waits for another thread to perform a task. A thread transitions back to the runnable state only when another thread signals the waiting thread to continue executing.
  • Timed waiting: A runnable thread can enter the timed waiting state for a specified interval of time. A thread in this state transitions back to the runnable state when that time interval expires or when the event it is waiting for occurs.
  • Terminated: A runnable thread enters the terminated state when it completes its task or otherwise terminates.
User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Does java support multithreading or not justify your answer?

yes!


Why is single thread system not used in java?

Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.Because the developers of Java considered the possibility of multithreading a big advantage. You don't HAVE TO use multiple threads; just use it when you need it.


What are multithreading concepts in java?

Multithreading in Java is the concept by which you can have multiple threads of execution running in parallel. Unfortunately the topic is too big to be summarized in one answers. You can check the related links section for links that can help you understanding this complex topic


Why java is multi threated?

Why shouldn't it? Multithreading is an advantage, because it lets you make full use of a computer with multiple processors. Mind you, you don't HAVE TO use it - you can perfectly well write programs without multithreading. But in actual practice, many situations arise where you want the computer to do several things at once. Even with a single processor, multithreading offers a convenient way to share the computer time between different tasks.


What is the difference between hyperthreading and simultaneous multithreading?

Actually, hyperthreading is Intel's name for its implementation of simultaneous multithreading.


What are multithreading models?

check


How old is simultaneous multithreading?

Simultaneous multithreading was first researched in 1968 as part of IBM's ACS-360 project.


What Is the name execution of multiple tasks at one time?

In computing this would be called "parallel processing" or "multithreading."


What is the ' ' called in java?

' ' would be the character for a space in Java.


What are the four principal approaches of multi threading?

The four principal approaches to multithreading are: Thread-based Multithreading: This approach involves creating multiple threads within a single process, allowing concurrent execution and better resource sharing. Process-based Multithreading: In this method, multiple processes run independently, each potentially containing its threads, which helps achieve parallelism but can lead to higher overhead. Event-driven Multithreading: This approach uses events or messages to trigger thread execution, allowing a program to remain responsive while performing tasks asynchronously. Fork-Join Multithreading: This model divides a task into subtasks (forking), processes them in parallel, and then combines the results (joining), optimizing resource use and execution time.


What is volatile and why are using in java?

volatile variable is mainly used in multithreading environment. so let me explain it from that context.In a multithreading environment,for a variable which is not marked as volatile will be stored in local cache memory for each thread. Meaning each thread will have a local copy of the variable and they dont know about what value this variable is having in another thread. If a variable is marked volatile, then the updations to this variable will happen in the main memory and not in local cache


How do you achieve plateform indepent in java?

Java is designed from the ground up for platform independence. All the programmer has to do is to abstain from using features that are platform-specific.