Package java.util.concurrent
Class ThreadLocalRandom
- java.lang.Object
-
- java.util.Random
-
- java.util.concurrent.ThreadLocalRandom
-
- All Implemented Interfaces:
Serializable
public class ThreadLocalRandom extends Random
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ThreadLocalRandomcurrent()Returns the current thread'sThreadLocalRandom.intnextInt(int minSize, int maxSize)
-
-
-
Method Detail
-
current
public static ThreadLocalRandom current()
Returns the current thread'sThreadLocalRandom.- Returns:
- the current thread's
ThreadLocalRandom
-
nextInt
public int nextInt(int minSize, int maxSize)
-
-