Home » JAVA Programming » Packages » Question
  1. What is the output of this program?
    package pack;
    public class Result
    {
    public static void main(String args[])
    {
    StringBuffer strbuf = new StringBuffer("IntervieM");
    strbuf.setCharAt(8, 'W');
    System.out.println(strbuf);
    }
    }

    Note : Result.class file is in directory pack;
    1. IntervieM
    2. Interview
    3. IntervieW
    4. Inter
    5. None of these
Correct Option: C

IntervieW



Your comments will be displayed only after manual approval.