Is there a function built into Java that capitalizes the first character of each word in a String, and does not affect the others?
Examples:
jon
With this simple code:
String example="hello"; example=example.substring(0,1).toUpperCase()+example.substring(1, example.length()); System.out.println(example);
Result: Hello