Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (s.equals(")"))
- {
- while(!stack.isEmpty())
- {
- String tkn=stack.pop();
- if(tkn.equals("("))
- {
- break;
- }
- else
- {
- list.add(tkn);
- }
- }
- }
- else if (s.equals("("))
- {
- stack.push(s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement