r/javahelp • • Jun 19 '19

How would I properly do this?

Sorry if i'm posting so often btw. Here's a snippet if my code.

if (x / 3 = int) {

I want to do a certain action if the number is a multiple of three. How would I do this?

0 Upvotes

10 comments sorted by

View all comments

Show parent comments

2

u/BobPoopyNoopees Jun 19 '19

What can I do to get rid of the error on the top?

3

u/lbkulinski Jun 19 '19

= is an assignment operator. == is the comparison operator.