-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
StringBuffer strbuf = new StringBuffer("Interview Mania");
StringBuffer strbuf0 = strbuf.reverse();
System.out.println(strbuf0);
}
}
-
- Interview Mania
- ainaM weivretnI
- weivretnI
- ainaM
- None of these
Correct Option: B
reverse() method reverses all characters. It returns the reversed object on which it was called.