Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- class main {
- public static void main(String[] args) {
- int size = Integer.parseInt(args[0]);
- System.out.println(size);
- System.out.println(main.DiceRoll(size));
- }
- public static int DiceRoll(int size) {
- Random generator = new Random();
- int finroll = generator.nextInt(size) + 1;
- return (finroll);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment