Here you can find the source of toUpper(char ch)
public static char toUpper(char ch)
//package com.java2s; public class Main { public static char toUpper(char ch) { if (inRange11(ch, 'a', 'z')) { return (char) (ch - 'a' + 'A'); }// w w w .java2 s . c o m return ch; } public static boolean inRange11(int val, int from, int to) { return val >= from && val <= to; } }