Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to know whats going wrong here. Please help. Type two statements using ne

ID: 3909568 • Letter: I

Question

I need to know whats going wrong here. Please help.

Type two statements using nextint0 to print two random integers between (and including) 0 and 9. End with a newline. Ex: 7 Note: For this activity, using one statement may yield different output (due to the compiler calling rand0 in a different order). Use two statements for this activity. (Notes) 1 import java.util.Scanner; 2 import java.util.Random; 4 public class DiceRoll 5 public static void main (String [] args) Random randGennew Random); int seedVal; 18 randGen.setSeed (seedVal); 12 System.out.print("First random number: ") 13 14 15 16 17 18 19 28 return; 21 System.out.println(randGen.nextInt(9)+1); System.out.print( "Second random number: "); System.out.print (randGen.nextInt (9)+1); Run Failed to compile main.java: 397: error: unreachable statement randGen.setSeed (seedVal) main.java: 418: error: unreachable statement randGen.setSeed (seedVal) 2 errors

Explanation / Answer

import java.util.Random; public class DiceRoll { public static void main(String[] args) { Random randGen = new Random(); System.out.println("First random number: " + randGen.nextInt(10)); System.out.println("Second random number: " + randGen.nextInt(10)); } }