Computer Applications
Give the output of the following code
System.out.println("Good".concat("Day"));
- GoodDay
- Good Day
- Goodday
- goodDay
Java String Handling
3 Likes
Answer
GoodDay
Reason — concat() method will add "Day" at the end of "Good" and "GoodDay" will be printed on the screen.
Answered By
2 Likes
Related Questions
A linear search
- can be used with sorted arrays only.
- can be used with unsorted arrays only.
- can be used with both sorted and unsorted arrays.
- cannot be used with arrays.
Method that converts a character to uppercase is
- toUpper()
- ToUpperCase()
- TOUPPERCASE()
- toUpperCase(char)
The array char arr[8] occupies :
- 32
- 8
- 16
- 24
This access specifier achieves the lowest level of accessibility.
- Public
- Protected
- Private
- Default