Java tutorial
//package com.java2s; import java.util.Locale; 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(Locale.US); else result += subStr; } return result; } }