0
What is the output of the following Java program?
public class Main {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder("ab");
sb.append("c").reverse();
sb.insert(1, "X");
System.out.println(sb);
}
}- AabcX
- BXcba
- CcbXa
- DcXba
Correct answer: D