Logic Flashcards
1
Q
De Morgan’s Law
A
!(a && b) == !a || !b
!(a || b) == !a && !b
2
Q
== or .equals
A
you can compare primitive types using ==, or you can say if String one = “Hello” and String two = one, those would be equal, but String two= “Hello” doesn’t equal, so use .equals to compare values.
3
Q
Logic equality
A
This means using .equals
4
Q
reference equality
A
This means using ==