본문 바로가기
JAVA

4일차// 대표적인 String 메소드, / 대문자--> 소문자/ toLowerCase( ) /소문자 --> 대문자/ toUpperCase( )

by aesup 2021. 1. 14.
728x90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
     //(문자열)소문자 --> 대문자
    
    String str10 = "abcDEF";
    String upStr = str10.toUpperCase();
    System.out.println("str10 = " + upStr); 
    //ABCDF 출력
    
    
    
    //(문자열)대문자--> 소문자
    
    String lowStr = str10.toLowerCase();
    System.out.println(lowStr);
    //abcdf 출력
cs

대문자--> 소문자

toLowerCase( )

 

소문자 --> 대문자

toUpperCase( )  

 

728x90