Java tutorial
//package com.java2s; public class Main { public final static String initCap(String s) { String str = ""; try { str = s.toLowerCase(); char[] ca = str.toCharArray(); char c = new String(new char[] { ca[0] }).toUpperCase().toCharArray()[0]; ca[0] = c; str = new String(ca); } catch (Exception ignore) { } return str; } }