package com.study.javastudy.study;
public class StringMethodExam {
public static void main(String[] args) {
//String str = new String("hello");
String str = "hello";
System.out.println(str.length()); // 5, 공백도 하나의 문자로 인식
System.out.println(str.concat(" world")); // hello world
System.out.println(str); // hello
str = str.concat(" world");
System.out.println(str); //hello world
System.out.println(str.substring(3)); // lo world
System.out.println(str.substring(3, 7)); // lo w, 3번부터 7이전까지, 배열은 0부터 시작
}
}