Here you can find the source of camelCased(String str)
static public String camelCased(String str)
//package com.java2s; //License from project: Apache License public class Main { static public String camelCased(String str) { StringBuilder result = new StringBuilder(); for (String part : str.split("\\s+")) { result.append(capitalizedFirst(part)); }//from w w w. ja va 2 s. co m return result.toString(); } static public String capitalizedFirst(String str) { return str.substring(0, 1).toUpperCase() + str.substring(1); } }