Here you can find the source of capitalizeFirstCharacter(String str)
static String capitalizeFirstCharacter(String str)
//package com.java2s; /*L/*from w ww.ja v a 2 s . c o m*/ * Copyright Georgetown University, Washington University. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cab2b/LICENSE.txt for details. */ public class Main { /** * Utility method to capitalize first character in the String */ static String capitalizeFirstCharacter(String str) { char[] chars = str.toCharArray(); char firstChar = chars[0]; chars[0] = Character.toUpperCase(firstChar); return new String(chars); } }