Multiple choice

What is the output of the given program?

public class Example {
 public static void main(String[] args) {
   String s1 = new String("Welcome to Aliensbrain");
   String s2 = new String("Welcome to Aliensbrain");
   String s3 =  new String("Welcome to Aliensbrain");
   if (s3 == (s1 == s2)) // Line 1 
      System.out.println("Equal");
   else 
      System.out.println("Not Equal");
 }
}

  1. Equal

  2. Not equal

  3. Blank output

  4. Error at line 1

  5. Run time error

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This is the correct answer.