private String convert(String infix){
		if(infix==null)
			return null;
		infix = "("+infix+")";
		Stack<Character> s = new Stack<Character>();
		HashMap<Character,Integer> map = new HashMap<Character,Integer>();
		map.put('-', 1);
		map.put('+', 1);
		map.put('*', 2);
		map.put('/', 2);
		map.put('^', 3);
		
		for(char c:infix.toCharArray()){
			if(c=='(')
				s.push(c);
			else if(c==')'){
				while(s.peek()!='('){
					System.out.print(s.pop());
				}
				s.pop();
			}
			else if(map.get(c) != null){ //Operator check
				while(s.peek()!=')' && s.peek()!='('){
					char last = s.peek();
					
						//Pop only higher order operators than current
						if(map.get(last)<map.get(c)){
							break;
						}
						else{
							System.out.print(last);
							s.pop();
						}					
				}
				s.push(c); //Push current operator
			}
			else
				System.out.print(c);//Print operands
		}
		
		
		return infix;
		
	}