Here you can find the source of capitalizeFirstLetter(String s)
public static String capitalizeFirstLetter(String s)
//package com.java2s; //License from project: LGPL public class Main { public static String capitalizeFirstLetter(String s) { return s.substring(0, 1).toUpperCase() + s.substring(1); }/*from w w w. ja v a2s . c o m*/ public static String substring(String S, int beginIndex, int endIndex) { if (beginIndex < endIndex && beginIndex >= 0 && endIndex <= S.length()) { return S.substring(beginIndex, endIndex); } else { return ""; } } public static String substring(String S, int beginIndex) { return substring(S, beginIndex, S.length()); } }