0:00

What does the following code print?

System.out.println(2 % 3);

1

What does the following code print?

System.out.println(19 % 5);

3

What does the following code print?

System.out.println(1 / 3);

2

What does the following code print?

System.out.println(2 + 3 * 5 - 1);

4

Given the following code segment, what is the value of b when it finishes executing?

double a = 9.6982;
int b = 12;
b = (int) a;
Java中将整数转换为浮点数时，小数点后的数字将被直接舍去，并非四舍五入。
4

Which of the following is the decimal value for the binary number 1001011?

$$2^6+2^3+2+1=64+8+2+1=75$$
1

How many bits would you need to represent 25 distinct values?

$$2^5=32>25>2^4=16$$
1

What is the hexadecimal equivalent of the following binary number: 110100?

1

What is the binary equivalent of the following base 10 number: 187?

$$187=128+32+16+8+2+1=2^7+2^5+2^4+2^3+2^1+2^0$$
3