I did not Understand about concept of object creation String polling and heap
String s1 = new String("text");
String s2 = new String("text");
String s3 = new String ("text1");
String s4 ="text";
String s5 = s4;
String s6 = new String();
s6 =s1;
Getting debugger in Value tab
That Means it create 5 object when it will line no 6
But it will execute total object 4
And when I written program this way
new String("text");
new String("text");
new String ("text");
it will create on heap but string polling it will created or not