public static void main(String... args) {
String chair, table = "metal";
chair = chair + table;
System.out.println(chair);
}
a) metal
b) metalmetal
c) nullmetal
d) The code does not compile.
Answer:
d) The code does not compile.
Explanation
The local variable chair may not have been initialized.