Check if a String is a Balanced String

A balanced String is a String with equal number of opening and closing matched brackets. In other words, an expression consisting of matching opening and closing brackets are called balanced strings. For instance, “adf(aew)23[34v3a*23]ade(we{wefave}qwef)ad[e[qew]]” is a balanced string, because after removing all the characters it is left with “()[]({})[[]]”.
Continue reading


Difference between concat() and concat operator ‘+’ in java

When there is a need to concatenate two or more strings in java we generally use the concatenation operator ‘+’. But, for the same purpose we should prefer using concat() method from String class. After a closer look at the size of .class files which is generated after compiling the code, it is revealed that the size of the .class file Continue reading