ICSE Class 10 Computer Applications Question 14 of 30

Solved Sample Paper 4 — Question 14

Back to all questions
14
Question

Question 1(xiv)

Give the output of the following code

System.out.println("Good".concat("Day"));
  1. GoodDay
  2. Good Day
  3. Goodday
  4. goodDay
Answer

GoodDay

Reason — concat() method will add "Day" at the end of "Good" and "GoodDay" will be printed on the screen.