Give the output of the following code:
System.out.println("Good".concat("Day"));
Click an option to check whether your answer is correct.
GoodDay
Reason — concat() method is used to join two strings. Thus, "Good" and "Day" are joined together and printed as "GoodDay".
Explore more questions from similar topics.
Share this MCQ with your friends or study group.