Multiple choice technology programming languages

import java.lang.*; class A { public static void main(String[] args) { StringBuilder s1=new StringBuilder("TCS"); StringBuilder s2=s1; System.out.println(s1==s2); System.out.println(s1.equals(s2)); } } What is the Result?

  1. false true

  2. false false

  3. true true

  4. true false

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

After s2 = s1, both variables reference the exact same StringBuilder object. The == operator returns true (same reference). StringBuilder's equals() method (inherited from Object) also returns true because it compares references, which are now identical.