use array to realize stack and use stack to realize queue delimiting is not finish yet, it use to finish the question below:
Design a method to check whether delimiting symbols match up correctly, and implement it in Java. Examples of correct and incorrect groups of delimiting symbols are provided below. You may want to use them to test your program.
Correct: ()(()){([()])} Correct: ((()(()){([()])})) Incorrect: )(()){([()])} Incorrect: ({[])} Incorrect: (
using stack