Driver program
public static void main ( String [ ] args ) { String s1 = " a - ( b + c ) " ; String s2 = " a - ( b - c - ( d + e ) ) - f " ; System . out . println ( simplify ( s1 ) ) ; System . out . println ( simplify ( s2 ) ) ; } }