Issue
I'm using the Version "4.7.2 December 2017 Update" of Eclipse and I have a warning that when I use:
System.out.println(20 % 10 == 0);
And in the "Problems" tab, this shows up: Warnings (1 item) > Comparing Identical Expressions
So how do I fix this warning, do I have to do in the Project Properties > Java Compiler > Errors/Warnings or Workspace Properties > Java > Compiler > Errors/Warnings or inside the Project Properties > Project Preference?
Solution
Eclipse is telling you that this expression will always be true.
If you really want to turn this off you can set the behavior for this in the Preferences in 'Java > Compiler > Errors/Warnings'. In the 'Potential programming issues' section set the action for 'Comparing identical values' to 'Ignore'
For a single project this can be configured in the project Properties in 'Java Compiler > Errors/Warnings'.
Answered By - greg-449
Answer Checked By - Marilyn (JavaFixing Volunteer)