(Random r)
| 58 | } |
| 59 | |
| 60 | private static void erroringMethod(Random r) { |
| 61 | String s = null; |
| 62 | System.out.println(""" |
| 63 | Hmm, what is the value of `guessThis` when the out-of-bounds exception is thrown? |
| 64 | Replace the first line of `answer.txt` accordingly. |
| 65 | Hint: Use an exception breakpoint."""); |
| 66 | while (r.nextInt(100) != 10) { |
| 67 | guessThis += r.nextInt(); |
| 68 | s = LOTS_OF_STRINGS[r.nextInt(LOTS_OF_STRINGS.length + 1)]; |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | public static void main(String[] args) { |
| 73 | puzzle(); |