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 = " world";
    System.out.println(str + " " + str2);
    }
    }
    1. Interview
    2. Mania
    3. Interview Mania
    4. Mania Interview
    5. None of these
Correct Option: C

Output: Interview Mania



Your comments will be displayed only after manual approval.