Category Archives: Java


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


How to Install Java – Ubuntu

Here we are going to discuss about installing Oracle Java in Ubuntu 14.04. Before moving forward, first check if Java is already installed or not.

If output of this command says “java command not found”, then you are good to go. If it says “java version x.x.x_xx”, then you already have Java installed. Further to this, if output contains “OpenJdk” in it, then you have “OpenJdk Java” installed in your machine.

Continue reading