Loading...
Is this your company?
String foo = "abc"; String foo1 = "abc" what does (foo == foo1) evaluate to?
Anonymous
Interviewer was wrong. You were correct.
better say it's based on different situations
I thought it was true because hey would be referencing the same object in memory because of String interning. Told the answer was false.
You are correct. I checked it with a compiler.
This situation is same as new String("abc") == new String("abc") rather than "abc"=="abc". so you was wrong.
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalised job recommendations and updates by starting your searches.