Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind Java String concat() Method?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ firstName = "John ";3Order
Put the learning moves in the order that makes the concept easiest to apply.
The concat() method appends (concatenate) a string to the end of another string.
Definition and Usage
Java String concat() Method
❮ String Methods
Example
String firstName = "John ";
String lastName = "Doe";
System.out.println(firstName.concat(lastName));Definition and Usage
The concat() method appends (concatenate) a string to the end of another string.
Syntax
public String concat(String
string2 )Parameter Values
| Parameter | Description |
|---|---|
| string2 | A String , representing the string that should be appended to the other string |
Technical Details
| Returns: | A String , representing the text of the combined strings |
|---|