Computer Science, asked by anjali2343, 1 month ago

Write a program in Java to generate a random value between 1 and 6 (both included)

please answer fast​

Answers

Answered by ArchBTW
0

Answer:

import java.util.Random;

public class test {

   public static void main(String[] args) {

       Random random = new Random();

       int num = random.nextInt(1, 7);

       System.out.println(num);

   }

Explanation:

Please mark it as the brainliest

Similar questions