Question PRG-JAVA-0044
MediumWhat is the output of this program?
public class Main {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder("abc");
sb.append("de").reverse().insert(0, "X");
System.out.println(sb);
}
}
- A.
edcbaX
- B.
abcdeX
- C.
Sign up free to see the answer and a step-by-step explanation.