반응형 문자열변환1 초보 자바 프로그래밍(38) - 문자열 변환 🔖 INDEX 대소문자 변환자바에서 문자열의 대소문자를 변환하기 위해, String 클래스에서 제공하는 toUpperCase() 및 toLowerCase() 메서드를 사용할 수 있습니다. 이 두 메서드는 각각 문자열의 모든 문자를 대문자 또는 소문자로 변환한 새로운 문자열을 반환합니다. 소문자로 변환하기toLowerCase() 메서드를 사용하여 문자열의 모든 문자를 소문자로 변환할 수 있습니다. 예를 들어:String input = "Hello World!";String lowerCaseInput = input.toLowerCase();System.out.println(lowerCaseInput); // 출력: hello world! 대문자로 변환하기toUpperCase() 메서드를 사용하여 문자열.. 2023. 5. 2. 이전 1 다음 반응형