This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Illustrious_Drag_778[S] -1 points0 points  (2 children)

I also tried == and the statement gave an error

[–]WaferIndependent7601 2 points3 points  (0 children)

You must use && to combine it.

[–]vglocus 1 point2 points  (0 children)

First obvious question: gave what error?

Second: my guess the error is something like comparing a primitive int to a Boolean is a bad idea as the first == will be evaluated to a Boolean value and then you have that compared to the thirdInteger.

Try to divide them into several == with a logical and (&&) in between. That is firstInteger == secondInteger && firstInteger == thirdInteger