init cap java

Java
String str = "java";
str = str.substring(0, 1).toUpperCase() + str.substring(1);
// str = "Java"
Source

Also in Java: