Thread Local Class in Java

The ThreadLocal class in Java provides a local variable for Threads. ThreadLocal class maintains values per Thread basis. Each Thread …

Read more

Callable and Future in Java

If a Thread require to return something after execution Callable interface. Callable interface contain only one method. If a Callable …

Read more

lock Interface in Java

lock object is similar to an implicit lock acquired by a thread to execute a synchronized method or Synchronized block. …

Read more

Thread Group in Java

In Java based on functionalities, we can group threads into a single unit which is known as Thread group that …

Read more

Linear search

Example:- if arr={12,14,18,16,15} search =15, then output will be “element found at index 4”. Steps:- Linear search in java:- Output(Element …

Read more

yield Method in Java

yield() method in Java is used for current thread execution to give a chance for waiting for a thread of …

Read more

Palindrome Number in Java

Palindrome Number:- A palindrome number a number which remains same after reversing it’s digits. Example – 16761, this is a …

Read more