Java toUpperCase () วิธีการ
toUpperCase () วิธีการสตริงตัวอักษรตัวพิมพ์เล็กแปลงเป็นตัวพิมพ์ใหญ่
ไวยากรณ์
public String toUpperCase() 或 public String toUpperCase(Locale locale)
พารามิเตอร์
ไม่
ราคาย้อนกลับ
อักขระตัวพิมพ์ใหญ่แปลงสตริงหลัง
ตัวอย่าง
public class Test { public static void main(String args[]) { String Str = new String("www.w3big.com"); System.out.print("返回值 :" ); System.out.println( Str.toUpperCase() ); } }
ดังกล่าวข้างต้นผลการทำงานของโปรแกรม:
返回值 :WWW.w3big.com