infix à postfix programme de conversion(java)

Je travaillais sur un infixe à postfix de programme(à l'aide de piles), mais après tous ces efforts, quelque chose a mal quelque part.Je suis sortie comme infixe sans conversion, veuillez vérifier si mon intopost méthode est correcte ou non.

    //stack class also containing the intopostfix method
   import java.util.*;
    public class Stack 
    {   int i,j;
char postfix[];
char stack[];
int top;
String post;
public Stack(int n)
{
    stack=new char[n];
    top=-1;
}
public void push(char item)
{
    if(top>=stack.length)
        System.out.println("Stack overflow");
    else
    {
        stack[++top]=item;
    }
}
public char pop()
{
    if(top==-1)
    {       System.out.println("Stack underflow");
            return 0;
    }
    else
        return stack[top--];
}
boolean isAlpha(char ch)
{
    if((ch>='a'&&ch<='z')||(ch>=0&&ch<='9'))
        return true;
    else 
        return false;

}
boolean isOperator(char ch)
{
    if(ch=='+'||ch=='-'||ch=='*'||ch=='/')
        return true;
    else return false;

}

void intopost(String str)
{
    postfix=new char[str.length()];
    char ch;

    j=0;

    for(i=0;i<str.length();i++)
    {
        ch=str.charAt(i);
        if(ch=='(')
            push(ch);
        else if(isAlpha(ch))
        {
            postfix[j++]=ch;
        }
        else if(isOperator(ch))
        {
            push (ch);
        }
        else if(ch==')')
        {
            while((pop())!='(')
                    {
                        postfix[j++]=pop();
                    }
        }

    }

}
void disp()
{
    for(i=0;i<postfix.length;i++)
    {   
        System.out.print(postfix[i]);
    }
}
}