Single Choice Moderate

Q

Give the output of the following code:

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

ID: #23968 ICSE Computer Application - Class X - 2022 PYQ 92 views
Question Info
#23968Q ID
ModerateDifficulty
ICSE Computer Application - Class X - 2022 PYQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

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

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

Challenge a friend or share with your study group.