Java Top

I just announced the new Learn Spring course, focused on the fundamentals of Spring 5 and Spring Boot 2:

>> CHECK OUT THE COURSE

The method concat() concatenates two Strings. Simply put, it connects them into a single String. If the length of the argument is 0, then the method simply returns the String object.

Available Signatures

public String concat(String str)

Example

@Test
public void whenCallConcat_thenCorrect() {
    assertEquals("elephant", "elep".concat("hant"));
}
Next »
Java String.contains()
« Previous
Java String.codePointAt()
Java bottom

I just announced the new Learn Spring course, focused on the fundamentals of Spring 5 and Spring Boot 2:

>> CHECK OUT THE COURSE
Comments are closed on this article!