Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java comparisons of boxed values #68

Open
bmistree opened this issue Nov 1, 2013 · 1 comment
Open

Java comparisons of boxed values #68

bmistree opened this issue Nov 1, 2013 · 1 comment
Labels

Comments

@bmistree
Copy link
Owner

bmistree commented Nov 1, 2013

Using ==, !=, etc., may be a bad idea on boxed values. See:
http://stackoverflow.com/questions/2021374/boxed-primitives-and-equivalence

@JayThomason
Copy link
Collaborator

You've probably already looked into this, but I think you want to either use the equals() method, the compareTo() method, or use == and getters for the values.

explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants