Win a copy of Terraform in Action this week in the Cloud forum!

Ramesh Ar

Greenhorn
+ Follow
since Sep 13, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramesh Ar

Hello Everyone,
Correct me if I am wrong. When you say new String("x") then two objects are created. One of them is placed on the heap and the other in the String pool (If not present). So when you iterate through the loop, new object is created everytime for new String("..") and another String object for new String("..") + i. So how does the result end up with 11?