R

Ram Sharma • 193.86K 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

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.