toUpperCase() ๋ฉ์๋๋ ๋ฌด์์ ๋๊น?
์
Java์์ toUpperCase() ๋ฉ์๋ ๋ฅผ ์ฌ์ฉํ์ฌ ๋ฌธ์์ด์ ๋ชจ๋ ๋๋ฌธ์๋ก ๋ณํํ๋ ๊ธฐ๋ณธ ์์ ๋ฅผ ์ดํด๋ณด๊ฒ ์ต๋๋ค .
public class UpperCase {
public static void main(String[] args) {
String myCountry = "pakistan";
System.out.println("My Country name is: " + myCountry);
// convert a string to uppercase
System.out.println("My Country name using toUpperCase() is: " + myCountry.toUpperCase() + "\n");
String paragraph = "Code Gym is an amazing place to start your java learning journey!";
System.out.println("Text paragraph: " + paragraph);
// convert a paragraph to uppercase
System.out.println("Text paragraph after using toUpperCase() method: " + paragraph.toUpperCase() + "\n");
char dummyChar = 'a';
System.out.println("dummyChar is: " + dummyChar);
// convert the primitive 'char' type to uppercase
System.out.println("dummyChar using toUpperCase() is: " + Character.toUpperCase(dummyChar));
}
}
์ฐ์ถ
๋ด ๊ตญ๊ฐ ์ด๋ฆ: pakistan toUpperCase()๋ฅผ ์ฌ์ฉํ๋ ๋ด ๊ตญ๊ฐ ์ด๋ฆ: PAKISTAN ํ
์คํธ ๋จ๋ฝ: Code Gym์ Java ํ์ต ์ฌ์ ์ ์์ํ ์ ์๋ ๋๋ผ์ด ์ฅ์์
๋๋ค! toUpperCase() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ ํ์ ํ
์คํธ ๋จ๋ฝ: CODE GYM์ JAVA ํ์ต ์ฌ์ ์ ์์ํ ์ ์๋ ๋๋ผ์ด ์ฅ์์
๋๋ค! dummyChar๋: toUpperCase()๋ฅผ ์ฌ์ฉํ๋ dummyChar๋: A
GO TO FULL VERSION