How to Check Balancing of Symbol using Stack in Java

Balance parentheses using stack in java. How to Check Balancing of Symbol (parentheses) in a mathematical expression using Stack in Java example.