JFo 5-1 and 2 Flashcards
Great for comparing primitives/values but terrible for comparing strings.
Relational Operators
=
Assignment operator
==
Equality operator
An operator used for assigning value
Assignment operator
An operator used for comparing variables
Equality operator
Strings are considered as objects. True or false?
True
Java looks into the location of the Strings rather than its content. True or false?
True
Used to compare Strings
equals() method / equalsIgnoreCase()
It is a case sensitive method used in comparing Strings.
equals() method
Unlike equals() method, this method is not case sensitive.
equalsIgnoreCase()
These are used to handle multiple conditions in Java.
Logical operators
&&
AND (Binary operator)
||
OR (Binary operator)
!
NOT (Unary operator)
It only takes ONE boolean value.
Unary operator