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)

1

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

2

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

3

Which interfaces that String implements in java?

4

What do you know about String class in java?

5

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