Home » Java ThreadLocalRandom current() Method with Examples

Java ThreadLocalRandom current() Method with Examples

by Online Tutorials Library

Java ThreadLocalRandom current() method

The current() method of Java ThreadLocalRandom class returns the current thread’s ThreadLocalRandom. It takes no parameter.

Syntax:

Parameter:

NA

Returns:

This method returns the current thread’s ThreadLocalRandom.

Example

Test it Now

Output:

Current thread's LocalThreadRandom name is: [email protected]  

You may also like