Here you can find the source of UpperCase(String str)
private static String UpperCase(String str)
//package com.java2s; public class Main { private static String UpperCase(String str) { int len = str.length(); String result = ""; for (int i = 0; i < len; i++) { String subStr = str.substring(i, i + 1); char subChar = str.charAt(i); if (subChar >= 'a' && subChar <= 'z') result += subStr.toUpperCase(); else//from w ww . ja va 2s.c om result += subStr; } return result; } }