Below is my code getting NZEC can anyone help me???
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class InfixToPostfix {
public static void main(String[] args) throws Exception {
int noOfTestCases;
int top = -1;
char[] items = new char[500];
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
noOfTestCases = Integer.parseInt(in.readLine());
while (noOfTestCases > 0) {
String str;
str = in.readLine();
int j = 0;
char[] postfix = new char[500];
for (int i = 0; i < str.length(); i++) {
if (Character.isLetter(str.charAt(i))) {
postfix[j++] = str.charAt(i);
}
else if (str.charAt(i) == '+' || str.charAt(i) == '-'
|| str.charAt(i) == '*' || str.charAt(i) == '/'
|| str.charAt(i) == '^') {
items[++top] = str.charAt(i);
}
else if (str.charAt(i) == ')') {
postfix[j++] = items[top--];
} else if (str.charAt(i) == '(') {
}
}
pw.println(postfix);
pw.flush();
pw.close();
}
noOfTestCases--;
}
}