Java String Capitalize capitalize(String s)

Here you can find the source of capitalize(String s)

Description

capitalize

License

Open Source License

Parameter

Parameter Description
s String object to capitalize.

Return

a capitalized String object.

Declaration

public static String capitalize(String s) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from   w  w  w . j  av a  2  s  .  c  o m
     * @param s String object to capitalize.
     * @return a capitalized String object.
     */
    public static String capitalize(String s) {
        return s.substring(0, 1).toUpperCase() + s.substring(1);
    }
}

Related

  1. capitalize(String s)
  2. capitalize(String s)
  3. capitalize(String s)
  4. capitalize(String s)
  5. capitalize(String s)
  6. capitalize(String s)
  7. capitalize(String s)
  8. capitalize(String s)
  9. capitalize(String s)