Give the output of the following code:

ICSE Class 10 Computer Applications PYQ · 2022 Semester 2 · Section A

1(vi)1 Mark · 2022 · Section A · 2022 Semester 2

Give the output of the following code:

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

Show SolutionHide Solution↓

GoodDay

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

← Previous questionNext question →

Browse the free Computer Applications sample bank