ืืื ืฉืืืช toUpperCase()?
ืืืืื
ืืืื ื ืกืชืื ืขื ืืืืื ืืกืืกืืช ืืืืจืช ืืืจืืืช ื-ALL-CAPS ืืืืฆืขืืช ืฉืืืช toUpperCase() ื-java.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));
}
}
ืชึฐืคืึผืงึธื
ืฉื ืืืืื ื ืฉืื ืืื: ืคืงืืกืื ืฉื ืืืืื ื ืฉืื ืืืืฆืขืืช toUpperCase() ืืื: PAKISTAN ืคืกืงืช ืืงืกื: Code Gym ืืื ืืงืื ืืืืื ืืืชืืื ืื ืืช ืืกืข ืืืืืื ืฉืื ืื'ืืืื! ืืงืกื ืคืกืงื ืืืืจ ืฉืืืืฉ ืืฉืืืช toUpperCase(): CODE GYM ืืื ืืงืื ืืืืื ืืืชืืื ืืช ืืกืข ืืืืืื ืฉืื ื-JAVA! dummyChar ืืื: dummyChar ืืืฉืชืืฉ ื-toUpperCase() ืืื: A
GO TO FULL VERSION