Toggle navigation
BuboFlash
Do you want BuboFlash to help you learning these things? Or do you want to add or correct something?
Click here
to log in or create user.
Contents
Selection
Flashcard status
Presentation
Question
Answer
Tags
#bloch-effective-java-2ed #java
Question
What is wrong with this implementation of compareTo()?
public int compareTo(PhoneNumber pn) { return lineNumber - pn.lineNumber; }
Answer
if pn.lineNumber is large and negative, int substraction can overflow silently
Tags
#bloch-effective-java-2ed #java
Question
What is wrong with this implementation of compareTo()?
public int compareTo(PhoneNumber pn) { return lineNumber - pn.lineNumber; }
Answer
?
Tags
#bloch-effective-java-2ed #java
Question
What is wrong with this implementation of compareTo()?
public int compareTo(PhoneNumber pn) { return lineNumber - pn.lineNumber; }
Answer
if pn.lineNumber is large and negative, int substraction can overflow silently
If you want to change selection, open document below and click on "Move attachment"
pdf
owner:
piotr.wasik
- (no access) - Effective Java (Joshua Bloch), 2ed, p66
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Add new event manually
Discussion
Do you want to join discussion?
Click here
to log in or create user.