I am trying to create a program that takes a string as an argument into its constructor. I need a method that checks whether the string is a balanced parenthesized expressio
You are pushing i - the index - on the stack, and comparing against ch. You should push and pop ch.
i
ch