Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public final class CaseInsentiveitveString {
- ...
- // broken
- @Override public boolean equals(Object o) {
- if (o instance of CaseInsentiveitveString)
- return s.equalsIgnoreCase(
- ((CaseInsentiveitveString) o).s);
- if (o instanceof String) // One-way interoperability!
- return s.equalsIgnoreCase((String) o);
- return false;
- }
- ...
- }
- null == 0 # true , null is equivelant to 0 ( in php )
- null === 0 # false, null is not equal to 0 ( in php )
- int i = 3;
- double d = 3.0;
- int i = 3;
- double d = 3.0;
- 0.9999999999999999... = 1
Add Comment
Please, Sign In to add comment