Comment générer un numéro de randome dans la gamme souhaitée java

Random r = new Random();
int n = r.nextInt(49) + 1;
Nutty Narwhal