¿Esta es tu empresa?
String foo = "abc"; String foo1 = "abc" what does (foo == foo1) evaluate to?
Anónimo
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.
Sigue a tus empresas favoritas para estar al tanto de las últimas oportunidades y disponer de información desde adentro.
Recibe recomendaciones y actualizaciones personalizadas al iniciar tu búsqueda.