Home » JAVA Programming » Strings » Question
  1. What is the output of this program?

    public class stringClass_Example
    {
    public static void main(String args[])
    {
    String str = "Interview";
    String str1 = "Mania";
    String str2 = str;
    str2 = " Mania";
    System.out.println(str + " " + str2);
    }
    }
    1. Mania
    2. Interview
    3. Mania Interview
    4. Interview Mania
    5. None of these
Correct Option: D

Interview Mania



Your comments will be displayed only after manual approval.