Problem
A common problem in compilers and word processors is determining whether the parentheses in a string are balanced and properly enclosed one within one. For example, the string ((( ) ) ( ) ) ( ) is well-balanced and cleanly written. But the strings )( )( or ( ) ) are not.
Write a Java program that prints TRUE if a string is properly written and balanced, and FALSE otherwise. Use a battery for this.