Java
[알고리즘/Java] String(문자열) - 대소문자 변환
▶ 방법 1. import java.util.Scanner; public class Main { public String solution(String str){ String answer = ""; for (char x : str.toCharArray()) { if (Character.isLowerCase(x)) answer += Character.toUpperCase(x); else answer += Character.toLowerCase(x); } return answer; } public static void main(String[] args) { Main T = new Main(); Scanner kb = new Scanner(System.in); String str = kb.next(); Syst..
2022. 7. 16. 11:21