Java String Upper Case toUpperCaseFirstChar(String s)

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

Description

to Upper Case First Char

License

Open Source License

Declaration

public static String toUpperCaseFirstChar(String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toUpperCaseFirstChar(String s) {
        if (s != null && s.length() > 0) {
            return Character.toUpperCase(s.charAt(0)) + s.substring(1);
        } else {//from  w w  w.  j  a  v a2 s  . c  o  m
            return s;
        }
    }
}

Related

  1. toUpperCaseFirst(String str)
  2. toUpperCaseFirst(String text)
  3. toUpperCaseFirst(String text)
  4. toUpperCaseFirstAll(String text)
  5. toUpperCaseFirstChar(final String str)
  6. toUpperCaseFirstChar(String str)
  7. toUpperCaseFirstChar(String str)
  8. toUpperCaseFirstChar(String string)
  9. toUpperCaseFirstChar(String string)