okay so I have this first class that breaks down a string, strips the spaces and everything, puts it into an Arraylist and feeds it to this parseRec class. For some reason when the first character is "+" it does not register for this first if statement. It surpasses it ang goes to the else statement which is supposed to only take integers. any ideas why?
public static Expression parseRec(ArrayList<String> list) {
while (list.size() != 0) {
if (list.get(i) == "+") {
System.out.println("got this far");
.....................
else {
System.out.println(list.get(i));
String intE = list.get(i);
Expression intExp = new IntExpression(intE);
list.remove(i);
return intExp;
}
}