MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2022 PYQ

Q

Give the output of the following code:

System.out.println("Good".concat("Day"));

Question ID
#23968
Subchapter
ICSE Computer Application - Class X - 2022 PYQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A GoodDay
  • B Good Day
  • C Goodday
  • D goodDay
Correct Answer: A

Explanation

GoodDay

Reason — concat() method is used to join two strings. Thus, "Good" and "Day" are joined together and printed as "GoodDay".

Share This Question

Share this MCQ with your friends or study group.