У меня эти настройки расположены в верхней части метода.Хранение int в массиве char
public static String eval(char[] postfix) {
StackInterface<Character> stack = new LinkedStack<>();
char[] answer = new char[postfix.length];
int numOne = 0;
int numTwo = 0;
int result = 0;
int i;
for (i=0; i < postfix.length; i++)
.....
вниз линии я сделал это:
if (!stack.empty()) {
numOne = stack.top();
stack.pop();
numTwo = stack.peek();
stack.pop();
//My problem is here. I can't push the result to my char[] array.
if (postfix[i] == '+') {
result = numOne + numTwo;
stack.push(result);
..........
Как настроить его так, что я могу нажать на результат двух pop()
«d переменных в моей char[]
массив?