Write a java program that converts a prefix expression to apostfix expression.
The input file “Prefix.in” contains aseries of error-free, simple arithmetic expressions in prefixnotation. There is one expression per line. The expressions aremade up of two types of symbols: (1) single-letter operands and (2)the operators +, -, *, and /. There may be zero, one, or moreblanks between symbols.
All output should be written to theoutput file, “Postfix.out”. Each prefix expression from the inputshould be echo-printed, with an appropriate label. After yourprogram converts the input expression to its postfix equivalent,the postfix expression should be printed to the output file, withan appropriate label.
Prefix: + * A B / CD
Postfix: A B * C D /+
Answer to Write a java program that converts a prefix expression to a postfix expression. Input The input file “Prefix.in” contain…