Java String.isEmpty()

The method isEmpty() is a convenience method that checks if the size
of a String is equal to zero.

Available Signatures

public boolean isEmpty()

Example

@Test
public void whenCallIsEmpty_thenCorrect() {
    String s1 = "";

    assertTrue(s1.isEmpty());
}

Next »

« Previous

Leave a Reply

Your email address will not be published.