This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
You only get performance problems with + applied to Strings when you do it repeatedly. There is no performance problem when it is only used in a single statement. Anyway, the 3 seconds it takes the user to enter the value will (at least slightly) outweigh the 2 microseconds ti takes to catenate ".log".
Vinney Shanmugam
Ranch Hand
Joined: Aug 27, 2008
Posts: 104
posted
0
Thanks for the Info.
But, if the class gets instantiated for 10 times, atleast 10 strings without references will be there in the memory, right?
say, test = "tomcat"
test = test + ".log" after this, test = "tomcat.log", where "tomcat" string is lost in the memory. Over a period of time will this through out of memory or delay in response to requests due to performance?