Error ')' and error ';' expected...

I’m writing two lines which get values from two text boxes and a combo box each and then convert all of those strings to ints and then send those ints to a method in another class to have a calculation done. I keep getting “Error: ‘;’ expected” and “Error: ‘)’” expected; usually I just check for missing braces or semicolons as the error implies but the two lines have a lot of them, if anyone can see a missing brace or something on these two lines it’ll help a lot.

			labelManaPoints.setText("Mana Points: "+(calculations.calculateMana(Integer.parseInt(boxManaPoints.getText()), Integer.parseInt(boxIntelligence.getText()), (int.valueOf(comboBoxType.getSelectedItem())).integerValue())));
			labelHealthPoints.setText("Health Points: "+(calculations.calculateHealth(Integer.parseInt(boxHealthPoints.getText()), Integer.parseInt(boxConstitution.getText()), (int.valueOf(comboBoxType.getSelectedItem())).integerValue())));

I think the error is somewhere around int.valueOf(comboBoxType.getSelectedItem()).integerValue() in both of them but I’m not sure…

Why do you have “int.valueOf”? It should be “Integer.valueOf”

Problem solved thanks to you and a little bit of API checking.

What IDE are you using? Eclipse should scream in mad when you type that.

But aside from depending on IDE, you better memorize it. Or better, muscle memorize! ;D

Eclipse probably would, but I don’t think it would tell you to change int to Integer :o

That’s the good part. Quick fix has its own limit and you should learn the rest :slight_smile: