Here you can find the source of toUpperCaseFirstOne(String s)
public static String toUpperCaseFirstOne(String s)
//package com.java2s; //License from project: Apache License public class Main { public static String toUpperCaseFirstOne(String s) { if (Character.isUpperCase(s.charAt(0))) return s; else//from ww w . j a v a2s . c o m return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1)) .toString(); } }