Как генерировать номер Рэндома в желаемом диапазоне Java

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