Ask coding questions

← Back to all posts
Simple calculator

Im try to add a '+' but every time i do it it tells me to add '.class' and then to close the brackets. but after closing the brackets i get an error saying " cannot be converted to bo

olean "

Answered by Wumi4 (531) [earned 5 cycles]
View Answer
Wumi4 (531)

The problem is with the condition of the if, it should be operator == "+", because = is for initialize a variable, and == is for comparison. Also, the char and char.class doesn't make any sense.


@Wumi4 Thanks for the help man. really appreciate it