자바 문자열 concat() 메서드
예시
두 문자열을 연결합니다.
String firstName = "John ";
String lastName = "Doe";
System.out.println(firstName.concat(lastName));
정의 및 사용
이 concat()
메서드는 문자열을 다른 문자열 끝에 추가(연결)합니다.
통사론
public String concat(String string2)
매개변수 값
Parameter | Description |
---|---|
string2 | A String , representing the string that
should be appended to the other string |
기술적 세부 사항
보고: | String 결합된 문자열의 텍스트를 나타내는 A |
---|
❮ 문자열 메서드