Question 19 :
What will be the result of compiling and running the following code?
What will be the result of compiling and running the following code?
Choose one answer.
a. Compiler error at line 3.
b. NullPointerException thrown at runtime.
c. Prints "hellonull".
d. None of the above.
a. Compiler error at line 3.
b. NullPointerException thrown at runtime.
c. Prints "hellonull".
d. None of the above.
Question 20 :
What is the result of compiling and running the given code?
Choose one answer.
a. Prints "AA BB CC"
b. Prints "AABBCC"
c. Does not compile
d. Causes an exception to be thrown
a. Prints "AA BB CC"
b. Prints "AABBCC"
c. Does not compile
d. Causes an exception to be thrown
Question 21 :
What is the result of attempting to compile and run the given code?
Choose one answer.
a. Prints "apples", "oranges", "pears" in separate lines.
b. Prints "10", "apples", "20", "oranges", "30", "pears" in separate lines.
c. Exception thrown at runtime.
d. Code does not compile.
e. None of these.
a. Prints "apples", "oranges", "pears" in separate lines.
b. Prints "10", "apples", "20", "oranges", "30", "pears" in separate lines.
c. Exception thrown at runtime.
d. Code does not compile.
e. None of these.
<<<Previous Page Next Page >>>