1(vi)
Give the output of the following code:
System.out.println("Good".concat("Day"));
- (a)GoodDay
- (b)Good Day
- (c)Goodday
- (d)goodDay
Show SolutionHide Solution↓
GoodDay
Reason — concat() method is used to join two strings. Thus, "Good" and "Day" are joined together and printed as "GoodDay".