Advertisement
cesarnascimento

método random numero de 1 a 6 dado

May 15th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.20 KB | None | 0 0
  1. package vetor;
  2.  
  3. import java.util.Random;
  4.  
  5. public class vetor {
  6.  
  7.     public static void main(String[] args) {
  8.         Random num = new Random();
  9.         System.out.println(num.nextInt(6)+1);
  10.         }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement