You shoudl try to make it more clear what you are trying to achieve with your programme and where exactly the problem is. I mean you have 3 If statements.



else if ( (out.equals("(")) ||...