Here you can find the source of toUpperCaseFirstChar(String s)
public static String toUpperCaseFirstChar(String s)
//package com.java2s; //License from project: Open Source License public class Main { public static String toUpperCaseFirstChar(String s) { if (s != null && s.length() > 0) { return Character.toUpperCase(s.charAt(0)) + s.substring(1); } else {//from w w w. j a v a2 s . c o m return s; } } }