Syvum Home Page

Home > Quiz Games > Java Programming >

Java Programming : Basic Operations : Multiple Choice


Answer the following questions about basic operations in the Java programming language.

Formats Info Page Worksheet / Test Paper Quiz Review
Multiple choice

Your Performance  

1.

Which of the following is not a hexadecimal number?
(A) 999
(B) (hex)23
(C) 0x556
(D) 0x1F2

  (A)

  (A), (B) & (C)

  (A) & (B)

  (C)

  Half-n-half Clue
 

2.

If not assigned a value, a variable of type char has the following default value:

  '\u0000'

  '\uffff'

  '\u0001'

  " " (space)

  Half-n-half Clue
 

3.

(1 | 4) + (4 & 2) = ?
(in base ten)

  1

  2

  8

  5

  3

  Half-n-half Clue
 

4.

Consider the following code: int x, y, z;
y = 1;
z = 5;
x = 0 - (++y) + z++;

After execution of this, what will be the values of x, y and z?

  x = -7, y = 1, z = 5

  x = 4, y = 2, z = 6

  x = 3, y = 2, z = 6

  x = 4, y = 1, z = 5

  Half-n-half Clue
 

5.

27 | 8 = ?

  19

  8

  35

  27

  Half-n-half Clue
 

6.

15 & 29 = ?

  13

  44

  12

  14

  Half-n-half Clue
 

7.

Select the invalid assignment statements from the following:
(A) float x = 238.88;
(B) double y = 0x443;

  (A) & (C)

  (B) & (D)

  (A) & (B)

  (B)

  Half-n-half Clue
 


 
12 more pages in Java Programming


Contact Info © 1999-2021 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright
Previous
-
Next
-