Here you can find the source of toCamelCase(String name)
public static String toCamelCase(String name)
//package com.java2s; //License from project: Open Source License public class Main { public static String toCamelCase(String name) { return toCamelCase(name.split("_")); }/*from w w w . j av a2 s. c o m*/ public static String toCamelCase(String[] parts) { StringBuilder buff = new StringBuilder(); for (String part : parts) { if (part.isEmpty()) { continue; } buff.append(Character.toUpperCase(part.charAt(0))); buff.append(part.substring(1)); } return buff.toString(); } }