JAVA/자바 오브젝트 메소드1 String 메소드 선언하고 할당하기 String str = "Hello World!"; 출력하기 String str = "This is string example." System.out.println("ex1 : " + str); 길이 구하기 length() String str = "AbcdEfghI01234"; System.out.println("The length of the str string is: " + str.length()); return 타입 int 대문자 / 소문자 변환 String str = "AbcDeFGhi"; System.out.println(str.toUpperCase());// "ABCDEFGHI" System.out.println(str.toLowerCase());// "abcdefghi" S.. 2022. 10. 1. 이전 1 다음