R

Ram Sharma • 193.88K Points
Coach

Q. What is the output of the following?

Code:
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
  • Correct Answer - Option(D)
  • Views: 212
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics