Java String Capitalize First capitalizeFirstLetter(final String variableName)

Here you can find the source of capitalizeFirstLetter(final String variableName)

Description

Returns the String passed in with the first letter capitalised.

License

Apache License

Parameter

Parameter Description
variableName the variable name as a string

Return

a String with the first letter in uppercase

Declaration

private static String capitalizeFirstLetter(final String variableName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**//from w  w w  .  j  a va  2 s  .  c  o  m
     * Returns the String passed in with the first letter capitalised.
     *
     * @param variableName the variable name as a string
     * @return a String with the first letter in uppercase
     */
    private static String capitalizeFirstLetter(final String variableName) {
        return variableName.substring(0, 1).toUpperCase() + variableName.substring(1);
    }
}

Related

  1. capitalizeFirstCharOfString(final String input)
  2. capitalizeFirstLeter(String sentence)
  3. capitalizeFirstLetter(final CharSequence chars)
  4. capitalizeFirstLetter(final String aString)
  5. capitalizeFirstLetter(final String s)
  6. capitalizeFirstLetter(String data)
  7. capitalizeFirstLetter(String data)
  8. capitalizeFirstLetter(String data)
  9. capitalizeFirstLetter(String message)