Computer Applications
Give the output of the following code:
System.out.println("Good".concat("Day"));
- GoodDay
- Good Day
- Goodday
- goodDay
Java String Handling
ICSE 2022
6 Likes
Answer
GoodDay
Reason — concat() method is used to join two strings. Thus, "Good" and "Day" are joined together and printed as "GoodDay".
Answered By
6 Likes
Related Questions
Corresponding wrapper class of float data type is …………… .
- FLOAT
- float
- Float
- Floating
…………… class is used to convert a primitive data type to its corresponding object.
- String
- Wrapper
- System
- Math
A single dimensional array contains N elements. What will be the last subscript?
- N
- N - 1
- N - 2
- N + 1
The access modifier that gives least accessibility is:
- private
- public
- protected
- package