But when you are using the concatenation at the run time, you have to do it using StringBuilder or String Buffer.
We have to identify the difference between these two. StringBuilder is NOT Synchronized and StringBuffer is Synchronized. Therefore when you want to work in a thread safe environment you have to use StringBuffer. Otherwise you have to use the StringBuilder. That would make the concatenation faster at runtime.
References :
No comments:
Post a Comment