Core Java Interview questions

Total available count: 646
Subject - Java Technologies
Subsubject - Core Java

Will it create two objects If two strings have same value using String literal in java?

No,only object created and the reference is given to second string. actually,when ever you assign a value,JVM checks the string pool first if it found value in pool it sends the reference to the instance otherwise it will create new object.


Next 5 interview question(s)


How can you create String object using String literal with example?


In how many ways String object can be created in java?


Which interfaces that String implements in java?


What do you know about String class in java?


In case of Multidimensional array,is it compulsory to mention size limit of all dimensions?