public static String underlinesToCamelCase(String string){
  StringBuilder sb=new StringBuilder(string.length());
  int n=string.length();
  int i=0;
  boolean upcaseNext=true;
  for (; i < n; i++) {
    char c=string.charAt(i);
    if (c == '_') {
      upcaseNext=true;
    }
 else {
      if (upcaseNext) {
        c=Character.toUpperCase(c);
      }
      upcaseNext=false;
      sb.append(c);
    }
  }
  return sb.toString();
}

public static String underlinesToCamelCase ( String string ) { StringBuilder sb = new StringBuilder ( string . length ( ) ) ; int n = string . length ( ) ; int i = 0 ; boolean upcaseNext = true ; for ( ; i < n ; i ++ ) { char c = string . charAt ( i ) ; if ( c == '_' ) { upcaseNext = true ; } else { if ( upcaseNext ) { c = Character . toUpperCase ( c ) ; } upcaseNext = false ; sb . append ( c ) ; } } return sb . toString ( ) ; }
converts an underlined_word into a camelcase word
