Operators Flashcards
1
Q
What are compound operators?
A
They are operators with multiple characters which perform multiple operations with their operands e.g.
the ones on the exam are the basic ones with = such as +=, -=, =, /
2
Q
What is the difference between equals for Object and equals for String?
A
== in Object is the same as .equals() If two references point to the same object, then it will return true.
In the String class, equals has been overriden and returns true if they strings are meaningfully equivalent.