Mega Code Archive

 
Categories / Java / Data Type
 

To Upper Case First Char

public class Util{   /**    * Transforms "some text" into "Some text"    * @param text    * @return    */   public static String toUpperCaseFirstChar(String text)   {     if(text != null && text.length() > 0)     {       return text.substring(0,1).toUpperCase() + text.substring(1);     }          return text;   }    }