StringBuilder sb = new StringBuilder("Hello, World!"); char c = sb.charAt(7); System.out.println(c); // Output: WIn this example, we create a new StringBuilder object and initialize it with the string "Hello, World!". We then use the charAt() method to retrieve the character at index 7, which is the letter "W". Finally, we print the character to the console. This code uses the java.lang package, which is automatically imported into every Java program.