Given the code fragments:
class Employee {
What is the result?
A. New York
B. City Not available
C. null
D. A NoSuchElementException is thrown at run time.
Given the code fragments:
class Employee {
What is the result?
A. New York
B. City Not available
C. null
D. A NoSuchElementException is thrown at run time.
B
Answer; C (assuming null is not priting anything)
Prints nothing (as eAddress will be “city not available”)
wrong
B
B