
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

int n1, n2, n3; String s1; Scanner keyboard = new Scanner(System.in);
n3 = keyboard.nextInt(); s1 = keyboard.nextLine(); n2 = keyboard.nextInt(); n1 = keyboard.nextInt(); n3 = keyboard.nextInt();
Suppose also that the following input is typed in at the keyboard:
What will be the values stored in the variables if the code segment is executed using the given keyboard input? Where you see whitespace on a line, assume it is exactly one space.