Question 1: So in Java, when you alter a string it, creates a new string object if its not in the pool because its immutable. so the following:
String s = "Lunch Time Doubly so";
s = s.substring(0, 10);
would create 3 String objects (s, s.sub, and the new reference to s), so does:
s = s.substring(0,2) & " sometext " & s.substring(2, 2);
create 3 String objects?
Question 2 so in .net does the same weight hold? for example in .net does:
dim s as string = "0213"
s = s.substring(0, 2) & " days and " & s.substring(2, 2) & " hours since you rocked on to Electric Avenue"
create 4 String objects?