Question 3
Not yet
answered
Flag question
What will be the output of the following code snippet?
public class Main {
public static void main(String[] args) {
}
String str = "Java";
StringBuilder sb = new StringBuilder(str);
sb.reverse();
System.out.println(sb.toString());
○ A. avaJ
B. Compilation error
○ C. Java
D. Runtime error