Comparison operators compare two values and return a boolean: either true or false. Java has of them.
System.out.println(5 == 5); // true
System.out.println(5 != 3); // true
System.out.println(5 < 10); // true
System.out.println(5 > 10); // false
System.out.println(5 <= 5); // true
System.out.println(5 >= 6); // false
You'll use these inside if statements and loops to control which code runs. The == operator checks equality (two equals signs). A single = is assignment, and mixing them up is one of the most common beginner bugs. Java will usually catch this with a compile error, but not always.