Richard_Sekol

8.14

Nov 23rd, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. package chap8;
  2. import java.util.Random;
  3. public class dice8Dot14 {
  4. private static Random generator;
  5. private int dx;
  6. public Die(int s){
  7. dx = s;
  8. generator = new Random();}
  9. public int cast(){
  10. return 1+ generator.nextInt(dx);}}
Advertisement
Add Comment
Please, Sign In to add comment