Java Random Int randint(int max)

Here you can find the source of randint(int max)

Description

randint

License

Open Source License

Declaration

public static int randint(int max) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Random;

public class Main {
    public static int randint(int max) {
        return new Random().nextInt(max);
    }/*from   ww w .j  a  v  a 2 s  .  c o  m*/
}

Related

  1. randInt()
  2. randInt()
  3. randInt(int l)
  4. randInt(int low, int high)
  5. randInt(int max)
  6. randInt(int min, int max)
  7. randInt(int min, int max)
  8. randInt(int min, int max)
  9. randInt(int min, int max)