Advertisement
KillianMills

Die.java

Nov 11th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. class Die{
  4.         int dieValue;
  5.        
  6.         int rollDie(){
  7.                 Random rngForDie = new Random();
  8.                 dieValue=rngForDie.nextInt(6)+1;
  9.                 System.out.println("The Die rolled: "+dieValue);
  10.                 return dieValue;
  11.         }      
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement