Ask coding questions

← Back to all posts
Simple calculator
ALVIJAYABASKARV (0)

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
Comments
hotnewtop
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.

ALVIJAYABASKARV (0)

@Wumi4 Thanks for the help man. really appreciate it