Exercise 9 weird error!

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
Exercise # 9/12

Modulo.java:5: error: unexpected type
System.out.println(myRemainder)= 14 % 6;
----------------------^
required: variable
found: value
1 error

(ignore the “----------”, i had to place the ^ correctly)

```

public class Modulo {
public static void main(String args) {

	int myRemainder = 2;
	System.out.println(myRemainder)= 14 % 6;

}

}

<do not remove the three backticks above>

Assignment requires a variable on the left side. Are you trying to print or assign at that line? Looks like a bit of both.

Hello

public class Modulo {
	public static void main(String[] args) {
		int myRemainder = 7 % 5;
		System.out.println(myRemainder);
	}
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.