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)


public void whenCallConcat_thenCorrect() {
    assertEquals("elephant", "elep".concat("hant"));
Next »
Java String.contains()
« Previous
Java String.codePointAt()
November Discount Launch 2022 – Bottom
We’re finally running a Black Friday launch. All Courses are 30% off until the end of this week:


Generic footer banner
Comments are closed on this article!