Here you can find the source of camelizeOneWord(String word, boolean firstLetterInLowerCase)
private static String camelizeOneWord(String word, boolean firstLetterInLowerCase)
//package com.java2s; /*//from w ww . ja va 2s. c o m * This software is distributed under the terms of the FSF * Gnu Lesser General Public License (see lgpl.txt). * * This program is distributed WITHOUT ANY WARRANTY. See the * GNU General Public License for more details. */ public class Main { private static String camelizeOneWord(String word, boolean firstLetterInLowerCase) { if (word == null || "".equals(word)) return word; String firstChar = word.substring(0, 1); String result = (firstLetterInLowerCase) ? firstChar.toLowerCase() : firstChar.toUpperCase(); if (word.length() > 1) { result += word.substring(1); } return result; } }