1(i)
Which of the following String methods results into boolean data type?
- (a)trim()
- (b)equals()
- (c)replace()
- (d)concat()
Show SolutionHide Solution↓
equals()
Reason — In Java, the equals() method compares the contents of two strings and returns a boolean value (true or false), whereas trim(), replace(), and concat() return new strings, not boolean values.