Here you can find the source of capitalize(String capitalizeMe)
public static String capitalize(String capitalizeMe)
//package com.java2s; /* Copyright 2004 - 2008 Kasper Nielsen <kasper@codehaus.org> * Licensed under the Apache 2.0 License. */ public class Main { public static String capitalize(String capitalizeMe) { if (capitalizeMe == null) { throw new NullPointerException("capitalizeMe is null"); } else if (capitalizeMe.length() == 0) { return capitalizeMe; }/*w ww. j a v a 2 s . c o m*/ return capitalizeMe.substring(0, 1).toUpperCase() + capitalizeMe.substring(1); } }