import java.util.Locale;
public class _01_String1 {
public static void main(String[] args) {
String s = "I like Java and Python and C.";
System.out.println(s);
//๋ฌธ์์ด์ ๊ธธ์ด
System.out.println(s.length()); //29
//๋์๋ฌธ์ ๋ณํ
System.out.println(s.toUpperCase()); //๋๋ฌธ์๋ก
System.out.println(s.toLowerCase()); //์๋ฌธ์๋ก
//ํฌํจ ๊ด๊ณ
System.out.println(s.contains("Java")); //ํฌํจ๋๋ค๋ฉด true
System.out.println(s.contains("C#")); //ํฌํจ๋์ง ์๋๋ค๋ฉด false
System.out.println(s.indexOf("Java")); //์์น ์ ๋ณด 7
System.out.println(s.indexOf("C#")); //ํฌํจ๋์ง ์๋๋ค๋ฉด -1
System.out.println(s.indexOf("and")); //์ฒ์ ์ผ์นํ๋ ์์น ์ ๋ณด (12)
System.out.println(s.lastIndexOf("and")); //๋ง์ง๋ง์ ์ผ์นํ๋ ์์น ์ ๋ณด (23)
System.out.println(s.startsWith("I like")); //์ด ๋ฌธ์์ด๋ก ์์ํ๋ฉด true (์๋๋ฉด false)
System.out.println(s.endsWith(".")); //์ด ๋ฌธ์์ด๋ก ๋๋๋ฉด true (์๋๋ฉด false)
}
}