Home » JAVA Programming » Files and I/O » Question
  1. What is the output of this program?
    public class output
    {
    public static void main(String args[])
    {
    StringBuffer s1 = new StringBuffer("Interview");
    s1.setCharAt(8,'W');
    System.out.println(s1);
    }
    }
    1. Interview
    2. Mania
    3. Compilation Error
    4. IntervieW
    5. Runtime Error
Correct Option: D

IntervieW



Your comments will be displayed only after manual approval.