- 문자열끼리 더해서 출력하면 합쳐서 출력됨
System.out.println("handsukite" + " 입니다."); // handsukite 입니다.
- "를 출력하려면 \"를 입력
System.out.println("handsukite \"25세\""); // handsukite "25세"
- 객체를 생성하지 않고 Math의 클래스를 사용할 수 있음
- PI : 파이값
- floor( ) : 내림값
- ceil( ) : 올림값
System.out.println(Math.PI); // 3.141592653589793
// 내림값
System.out.println(Math.floor(Math.PI));
// 올림값
SyStem.out.println(Math.ceil(Math.PI));
- length( ) : 문자열의 길이를 반환
- replace( ) : 문자열에서 문자를 변경
// 문자열의 길이 반환
System.out.println("handsukite".length()); // 10
// 문자열의 문자 변경
System.out.println("handsukite".replace("u", "oo")); // handsookite