Here you can find the source of capitalize(String word)
public static String capitalize(String word)
//package com.java2s; // This file is part of MarMoT, which is licensed under GPLv3. public class Main { public static String capitalize(String word) { StringBuilder sb = new StringBuilder(word); sb.setCharAt(0, Character.toUpperCase(sb.charAt(0))); return sb.toString(); }/* w w w . j a va 2s . c om*/ }