Java 8 | String Method 3

Student Kim
Buzz Code
Published in
Feb 10, 2021

Following from the last time, let’s see what kind of methods we can use on the String.

(1) trim()

This method removes the spaces in the beginning and the end of the String. It doesn’t need parameter.

(2) concat()

It puts two String into one.

(3) replaceFirst()

It’s similar with the replace() method, but it only changes the first letters that are same with the String parameter.

(4) equalsIgnoreCase()

This method is same with the equals() method, but

(5) isEmpty()

This method returns true if the String’s length is 0.

That’s all for today guys, let’s practice the String methods next time! Thank you for reading my post, see ya!

--

--