The following code fragment reads in two numbers:

Scanner input = new Scanner(System.in);
int i = input.nextInt();
double d = input.nextDouble();

What is the incorrect way to enter these two numbers?

a. Enter an integer, a space, a double value, and then the Enter key.
b. Enter an integer, two spaces, a double value, and then the Enter key.
c. Enter an integer, an Enter key, a double value, and then the Enter key.
d. Enter a numeric value with a decimal point, a space, an integer, and then the Enter key.

d

Computer Science & Information Technology

You might also like to view...

MAC address ________ enables VMs to change the source MAC address in outgoing packets to one that is not assigned to them

Fill in the blank(s) with correct word

Computer Science & Information Technology

What is the maximum width of each transaction in the binarized data?

Consider the traffic accident data set shown in Table 7.1.

Computer Science & Information Technology