본문 바로가기

Algorithm/백준

[백준] 15000번: CAPS - JAVA [자바]

 

문제


 

 

 

  • 소문자로 입력 받은 문자를 대문자로 변경하여 출력하는 문제입니다.

 

 

풀이 방법


  1. 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());
    }
}