Skip to main content


Showing posts from December, 2015

Use String Class Carefully

If two Strings are concatenated using “+” operator in a “for” loop, then it creates a new String Object, every time. This causes wastage of memory and increases performance time.  Also, while instantiating a String Object, constructors should be avoided and instantiation should happen directly. For example: 1//Slower Instantiation 2