i have this code it's convert infix to postfix
but i wantto build apostfix tree can u help me
package untitled10;
import java.*;
import java.util.*;
import javax.swing.tree.*;
import javax.*;
import javax.swing.*;
public class InfixConverter {



public static void main(String[] args){





InfixConverter in = new InfixConverter();
Stack s = in.conversion("A*B+C*D");



}


public static Stack conversion(String infix){
InfixConverter t = new InfixConverter();
ArrayList tokens = t.tokenizeString(infix);
System.out.println(tokens.toString());
Iterator it = tokens.iterator();
Stack stack = new Stack();
Stack remember = new Stack();
while(it.hasNext()){
String s = ((String)it.next());
System.out.println("s="+s+";");
char c = s.charAt(0);
stack.push(s);
if(it.hasNext()){
System.out.println("s="+s+"ddd");
String s1 = ((String)it.next());
char c1 = s1.charAt(0);
int check=IsOperand(c1);
if (check==1){

stack.push(s1);
}
else if(remember.empty()){
// System.out.println("sdsd");
remember.push(s1);
System.out.println("sdsd"); }
else{
String s2=(String)remember.pop();
// System.out.println("sg");
char c2=s2.charAt(0);
if (TakesPrecedence(c1,c2)==1){
// System.out.println("ss");
//stack.push(s1);
remember.push(s2);
remember.push(s1);
System.out.println("s=gg"+s1);

}
else {

System.out.println("s="+s+";"+s1);
stack.push(s2);
System.out.println("sdsd1");
remember.push(s1);
System.out.println("sdsd2"); }
//what i have to use for loop end alone


}



// default: stack.push(s);
}}
do {
//String x =(String)remember.pop();
// System.out.println("s="+s+";"+x);
// System.out.println("snn");
stack.push(remember.pop());
//System.out.println("kj");
}while (!remember.empty());

System.out.println(stack.toString());

return stack;
}
//[(, 1, 2,(,*, 3, 4]
public ArrayList tokenizeString(String s){
ArrayList tokens = new ArrayList();
String number="";
for(int i =0;i<s.length();i++){
char c = s.charAt(i);
if(Character.isDigit(c)){
number+=c;
}
else{
if(!number.equals("")){
tokens.add(number);
number="";
}
tokens.add(c+"");
}
}
if(!number.equals("")){
tokens.add(number);
}
return tokens;
}
public static int IsOperand(char ch)
{
if (((ch>='a')&&(ch<='z'))||
((ch>='A')&&(ch<='Z')) ||
((ch >= '0') && (ch <= '9')))
return 1;
else
return 0;
}
public static int TakesPrecedence(char OperatorA,char OperatorB)
{
if (OperatorA == '(')
return 0;
else if (OperatorB == '(')
return 0;
else if (OperatorB == ')')
return 1;
else if ((OperatorA == '^') && (OperatorB == '^'))
return 0;
else if (OperatorA == '^')
return 1;
else if (OperatorB == '^')
return 0;
else if ((OperatorA == '*') || (OperatorA == '/'))
return 1;
else if ((OperatorB == '*') || (OperatorB == '/'))
return 0;
else
return 1;}




}