we've included displaystack(method to display the entire contents of the stack in the stackx class in theorythis isn' playing by the rulesyou're only supposed to access the item at the top howeveras diagnostic aid it' useful to see the contents of the stack at each stage of the translation here' some sample interaction with infix javaenter infixinput= *( + )- /( +ffor stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)parsing arithmetic expressionsfor stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)while stack (bottom-->top)while stack (bottom-->top)end stack (bottom-->top)postfix is abc+*def+/the output shows where the displaystack(method was called (from the for loopthe while loopor at the end of the programand within the for loopwhat character has just been read from the input string you can use single-digit numbers like and instead of symbols like and they're all just characters to the program for exampleenter infixinput= + * for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)for stack (bottom-->top)while stack (bottom-->top)while stack (bottom-->top)end stack (bottom-->top)postfix is *of coursein the postfix outputthe means the separate numbers and the infix java program doesn' check the input for errors if you type an incorrect infix expressionthe program will provide erroneous output or crash and burn experiment with this program start with some simple infix expressionsand see if you can predict what the postfix will be then run the program to verify your answer pretty soonyou'll be postfix gurumuch sought-after at cocktail parties