String () { StringBuilder result = new StringBuilder(); boolean capitalize = true; for (char c : toString().toCharArray()) { if (c == '_') { capitalize = true; continue; } if (capitalize) { result.append(Character.toUpperCase(c)); capitalize = false; } else { result.append(Character.toLowerCase(c)); } } return result.toString(); }