List java api that supports threads?



List java api that supports threads?..

Answer / anand mandal

Java provides several APIs and classes to support multithreading:

1. `java.lang.Thread`: This class is at the core of Java's multithreading support and is used to create and manage threads.

2. `java.lang.Runnable`: The `Runnable` interface allows you to define the code that a thread will execute, providing a more flexible way to implement multithreading.

3. `java.util.concurrent`: This package contains classes and interfaces for high-level concurrency control, such as the `Executor` framework, concurrent collections, and thread pools.

4. `java.util.concurrent.atomic`: It provides atomic variables for thread-safe operations on single variables without the need for explicit synchronization.

5. `java.util.concurrent.locks`: This package contains more advanced locking mechanisms like ReentrantLock and ReadWriteLock, allowing for more fine-grained control over thread synchronization.

6. `java.util.concurrent.Future`: The `Future` interface represents the result of an asynchronous computation and is commonly used for managing asynchronous tasks.

These APIs and classes enable effective multithreading in Java, helping developers write concurrent and efficient programs.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is void a data type in java?

0 Answers  


What is java thread dump, how can we get java thread dump of a program?

0 Answers  


In real time project which driver did u use? What is the main functionality of the Prepared Statement?

3 Answers   Photon,


What is byte value?

0 Answers  


When is an object subject to garbage collection?

0 Answers  


How do you sort a string in alphabetical order in java?

0 Answers  


What is literal example?

0 Answers  


what is the meaning of java.lang and java.util

6 Answers  


What is the differnence between String Buffer and String builder despite having knowledge that String builder is faster than String Buffer and last one is threadsafe.please tell another important difference.

3 Answers   IBM,


What is threaded programming and when is it used? : Java thread

0 Answers  


Explain an algorithm to find depth of a binary tree.

0 Answers   Akamai Technologies,


What are the uses of java?

0 Answers  


Categories