Sponsored Link •
Says most time contract should be fulfilled, otherwise its an "optional clause".
Exception Safety: an exception should mean that the object is still usable, unless otherwise indicated in the semantics. I.e., when I ask an object to perform a service and the object throws an exception back at me, I want to be confident that I can subsequently ask the object to do something else for me, or the same thing again later, etc. Gives an opportunity to mention finally clauses, which are executed as exceptions propagate up the stack.
0 <= index < length()
charAt(), you'll get an (unchecked)
Stringis somehow unable to meet the post-conditions and invariants, it will also throw an exception.