public class SetCharAt { public static void main(String args[]) { StringBuffer str = new StringBuffer("JAVA"); str.setCharAt(3, 'L'); System.out.println(str); } }