Here you can find the source of toUpperCase(final char c)
public static char toUpperCase(final char c)
//package com.java2s; /*/*from w w w . j av a 2 s. c o m*/ * Copyright (c) 2015 Gargoyle Software Inc. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (http://www.gnu.org/licenses/). */ public class Main { public static char toUpperCase(final char c) { return (char) toUpperCase((int) c); } public static int toUpperCase(final int c) { if (c < 128) { return ('a' <= c && c <= 'z') ? c + ('A' - 'a') : c; } // Do not convert non-ASCII lower case character to ASCII upper case. final int upper = Character.toUpperCase(c); return (upper < 128) ? c : upper; } }