Pregunta de entrevista de Six Dee Telecom Solutions

Difference between String and new String. How will the load be handled. I don't know who will ask these type of question while interviewing for java lead.

Respuestas de entrevistas

Anónimo

24 oct 2019

I answered it. So simple. Just one question he repeatedly kept asking how we decide what should be used.

Anónimo

23 dic 2020

The string is a literal which is on a shared pool of string while the new string is a reference if you do an identity check in referral it fails while on the string it will succed.