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

what is bmg file and how to create that files?what will it contailn?

0 Answers   HCL, Probe Services,


What is mutable object and immutable object?

0 Answers  


What is class array in java?

0 Answers  


Have you ever used hashtable and dictionary?

0 Answers  


What is the difference between public, private, protected, and friend access?

0 Answers   Amazon,






Describe the various concepts related to object oriented programming (oop).

0 Answers  


What is ResourceBundle class?

1 Answers  


Can a private method be declared as static?

0 Answers   Global Logic,


java program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

7 Answers   HCL, Wipro,


Is there any difference between synchronized methods and synchronized statements?

0 Answers  


How many objects are created for a singleton class

7 Answers   Ness Technologies,


What is string pooling concept?

0 Answers  


Categories