How to convert first char of string to upper case in java

How to convert first char of string to upper case in java
/**
 * @author lautturi.com
 * Java example: Capitalize the first letter of string in java
 */

import java.util.*;

public class Lautturi {
	
	public static void main(String[] args) {

		String str = "hello Java";
		char firstChar = Character.toUpperCase(str.charAt(0));
		//String firstChar = str.substring(0,1).toUpperCase();
		
		String newStr = firstChar + str.substring(1);
		System.out.println(newStr);
	}
}
Source:‮www‬.lautturi.com

output:

Hello Java
Created Time:2017-09-11 09:22:04  Author:lautturi