Multiple choice technology programming languages

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

  1. false true

  2. false false

  3. true false

  4. true true

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

new StringBuilder() creates two distinct objects, so == returns false (different references). StringBuilder does NOT override equals() - it inherits Object's default implementation which also checks reference equality. Therefore equals() returns false too, unlike String which compares content.