1. In Java, what does the last line mean? What does
scan.nextLine(); mean?import java.util.Scanner;Scanner scan = new Scanner (System.in);message = scan.nextLine();2. Assuming that a Random object has been created called
generator, what is the range of the result of each of the following
expressions? Also, do each
example using nextFloat()•generator.nextInt(20)•generator.nextInt(8) + 1•generator.nextInt(100) – 50