What is output of the following code:


public class Test {
public static void main(String[] args) {
int[] x = {120, 200, 016};
for (int i = 0; i < x.length; i++)
System.out.print(x[i] + " ");
}
}
a. 120 200 16
b. 120 200 14
c. 120 200 20
d. 016 is a compile error. It should be written as 16.


b. 120 200 14
016 is an octal number. The prefix 0 indicates that a number is in octal.

Computer Science & Information Technology

You might also like to view...

The NIC Teaming mode _______ requires custom configurations on theswitch and host to identify the links as being part of the team

Fill in the blank(s) with correct word

Computer Science & Information Technology

One trend involving servers is ____________________, which means creating virtual (rather than actual) versions of a computing resource.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The ____ includes eight categories of buttons displayed with a drop-down menu.

A. Menu bar B. Standard toolbar C. Insert panel D. Document toolbar

Computer Science & Information Technology

Which device would you use to detect wildlife in your garden?

a. Accelerometer b. Microwave radar sensor c. Light-dependent resistor d. Hydrophone

Computer Science & Information Technology