Here you can find the source of underScore2CamelCase(String strs)
public static String underScore2CamelCase(String strs)
//package com.java2s; //License from project: Apache License public class Main { public static String underScore2CamelCase(String strs) { if (strs == null || !strs.contains("_")) { return strs; }//from w w w. j a v a 2s . c om StringBuilder sb = new StringBuilder(""); String[] elems = strs.split("_"); for (int i = 0; i < elems.length; i++) { String elem = elems[i].toLowerCase(); if (i != 0) { char first = elem.toCharArray()[0]; sb.append((char) (first - 32)).append(elem.substring(1)); } else { sb.append(elem); } } return sb.toString(); } }