using java genrate any ramdom number
Share
using java genrate any ramdom number
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
first step:Import the class java.util.concurrent.ThreadLocalRandom.
2nd step:Call the method. To generate random numberof type int ThreadLocalRandom.current().nextInt() To generate random number of type double ThreadLocalRandom.current().nextDouble()