Question 40 :
What will be printed on standard output if the following class is executed using the command "java Test 1 two 3" ?
Choose one option
a. 1
b. two
c. NumberFormatException
d. ArrayIndexOutOfBoundsException
e. Code does not compile
a. 1
b. two
c. NumberFormatException
d. ArrayIndexOutOfBoundsException
e. Code does not compile
Question 41:
What value is printed out by executing the following code?
Choose one answer
a. 2.7
b. 1.7
c. 0.0
d. -1.0
a. 2.7
b. 1.7
c. 0.0
d. -1.0
Question 42 :
What will happen when you attempt to compile and run the following code? (Assume that the code is compiled and run with assertions enabled.)
Choose one answer.
a. It will print odd and even numbers from 0 to 9 correctly (0 even and 1 odd).
b. It will print odd and even numbers from 0 to 9 incorrectly (0 odd and 1 even).
c. Compilation error at line 9.
d. Compilation error at line 10.
e. It will result in an infinite loo
b. It will print odd and even numbers from 0 to 9 incorrectly (0 odd and 1 even).
c. Compilation error at line 9.
d. Compilation error at line 10.
e. It will result in an infinite loo
<<<Previous Page Next Page >>>