Here you can find the source of toUpperCase(String string)
Parameter | Description |
---|
public static String toUpperCase(String string)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w. j a v a 2 s.com * Makes sure that the first character in a string is upper case. This is useful when presenting data * taken directly from the jvm or another source which may not have nice data. * * @param string: The string being corrected. * @return String: A new String which has the upper case correction applied to it. */ public static String toUpperCase(String string) { return Character.toString(string.charAt(0)).toUpperCase() + string.substring(1); } }