Java String Capitalize capitalise(String line)

Here you can find the source of capitalise(String line)

Description

Returns the given string with the first letter capitalised

License

LGPL

Parameter

Parameter Description
line a parameter

Declaration

public static String capitalise(String line) 

Method Source Code

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

public class Main {
    /**/*  w ww  .  j av a 2 s  .  c  om*/
     * Returns the given string with the first letter capitalised
     * @param line
     * @return
     */
    public static String capitalise(String line) {
        return Character.toUpperCase(line.charAt(0)) + line.substring(1);
    }
}

Related

  1. capitalise(final String name)
  2. capitalise(String name)
  3. capitalise(String s)
  4. capitalise(String s)
  5. capitalise(String s)