/*Write a method seven that accepts a Random parameter and uses it to draw up to ten lotto numbers from 1-30. If any of the numbers is a lucky 7, the method should stop and return true. If none of the ten are 7 it should return false. The method should print each number as it is drawn. 15 29 18 29 11 3 30 17 19 22 (first call) 29 5 29 4 7 (second call) */ import java.util.*; public class Lotto { public static void main(String[] args) { Random r = new Random(); seven(r); } public static boolean seven(Random r) { for(int i = 0; i < 10; i++) { int num = r.nextInt(30) + 1; System.out.print(num + " "); if(num == 7) { return true; } } return false; } }