Java replace character at specific position in string

Java replace character at specific position in string
/**
 * @author lautturi.com 
 * Java example:Replaces a character at a specific position in a string
 */

import java.util.*;

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

		//Orlautturinal String
		String str = "Hallo java.";
		// character to replace
		char ch = 'e'; 
		// replaced index
		int index = 1;
		// replace string
		str = str.substring(0, index) + ch + str.substring(index + 1);

		System.out.println(str);
	}
}
Source‮w:‬ww.lautturi.com

output:

Hello java.
Created Time:2017-09-28 21:18:10  Author:lautturi