Skip to content

Glossary: Java Basics

Comparison operators

Also written: ==, !=, <, <=, >, >=, comparison

Operators that ask a yes-or-no question and give a `boolean`: `==` equal, `!=` not equal, `<`, `<=`, `>` and `>=`. Use `equals`, not `==`, for strings.

Where the book teaches it

Related terms

Conditionbooleanequals