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".
Joined: Aug 27, 2008
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?