문제
- 소문자로 입력 받은 문자를 대문자로 변경하여 출력하는 문제입니다.
풀이 방법
- String Class의 method인 toUpperCase() method를 사용하여 소문자를 대문자로 변경하여 출력합니다.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
System.out.println(str.toUpperCase());
}
}
'Algorithm > 백준' 카테고리의 다른 글
[백준] 14038번: Tournament Selection - JAVA[자바] (0) | 2023.04.16 |
---|---|
[백준] 19602번: Dog Treats - JAVA[자바] (0) | 2023.04.16 |
[백준] 6764번: Sounds fishy! - JAVA[자바] (0) | 2023.04.16 |
[백준] 13597번: Tri-du - JAVA[자바] (0) | 2023.04.15 |
[백준] Bronze IV - 문제 풀이 (0) | 2023.03.20 |