Here you can find the source of capitalizeFirstLetter(String[] strArr)
public static String[] capitalizeFirstLetter(String[] strArr)
//package com.java2s; //License from project: Creative Commons License public class Main { public static String[] capitalizeFirstLetter(String[] strArr) { for (int j = 0; j < strArr.length; j++) { strArr[j] = capitalizeFirstLetter(strArr[j]); }//w ww . j av a 2 s.com return strArr; } public static String capitalizeFirstLetter(String word) { if (word.length() >= 2) { word = word.substring(0, 1).toUpperCase() + word.substring(1).toLowerCase(); } else { word = word.toUpperCase(); } return word; } }