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.

Identify the statements that are correct:
(A) int a = 13, a>>2 = 3
(B) int b = -8, b>>1 = -4
(C) int a = 13, a>>>2 = 3
(D) int b = -8, b>>>1 = -4

  (C) & (D)

  (A), (B), (C) & (D)

  (A), (B) & (C)

  (A) & (B)

  Half-n-half Clue
 

2.

What will be the value of a after execution of the following statements:
int a = 23, b = 34;
a = ((a < b) ? (b + a) : (b - a);

  23

  34

  Error. Cannot be executed.

  11

  57

  Half-n-half Clue
 

3.

The type long can be used to store values in the following range:

  -264 to 264

  -232 to 232 - 1

  -231 to 231 - 1

  -263 to 263 - 1

  Half-n-half Clue
 

4.

Which of the following represent legal flow control statements?
(A) break;
(B) break();
(C) continue outer;
(D) continue(inner);
(E) return;
(F) exit();

  (A), (C) & (E)

  (A), (B) & (C)

  (C) & (E)

  (A) & (E)

  (A), (C) & (D)

  Half-n-half Clue
 

5.

15 & 29 = ?

  14

  12

  13

  44

  Half-n-half Clue
 

6.

Choose the operations that can be performed on String objects:
(A) +
(B) + =
(C) -
(D) %
(E) ^

  (D) & (E)

  (A) & (B)

  (A)

  None of these

  (D)/option>

  Half-n-half Clue
 

7.

Of the following functions from the class java.lang.Math, select those that produce a value of 25, when a = 25.7.

  (C) & (E)

  (D) & (E)

  (A)

  (C)

  (A), (C) & (E)

  Half-n-half Clue
 


 
12 more pages in Java Programming


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