Here you can find the source of camelToComposite(String camel)
public static String camelToComposite(String camel)
//package com.java2s; public class Main { public static String camelToComposite(String camel) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < camel.length(); i++) { char ch = camel.charAt(i); if (i > 0 && Character.isUpperCase(ch)) { sb.append('_'); sb.append(ch);/*from ww w .j a v a 2 s .co m*/ } else { sb.append(Character.toUpperCase(ch)); } } return sb.toString(); } public static String toString(Object[] strArr) { StringBuilder sb = new StringBuilder(); boolean flag = true; for (Object str : strArr) { if (flag) { flag = false; } else { sb.append(','); } sb.append(str); } return sb.toString(); } }