Convert first letter of a String to uppercase in Java

Problem

Given the following non-null and non-empty String:

String s = "paris";

How to convert this String to a String with the first letter capitalized (i.e. Paris)?

Solution

String t = new StringBuilder(s.length())
           .append(s.substring(0, 1).toUpperCase())
           .append(s.substring(1))
           .toString();