Java examples for java.lang:String Case
The following code shows how to make First Letter Upper Case.
//package com.java2s; public class Main { public static void main(String[] argv) { String s = "java2s.com"; System.out.println(makeFirstLetterUpperCase(s)); }//from w w w. j a v a 2 s .c o m public static String makeFirstLetterUpperCase(String s) { return Character.toUpperCase(s.charAt(0)) + s.substring(1); } }