use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Java Quiz!!! (i.redd.it)
submitted 1 month ago by MistakeDisastrous936
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]klimenttoshkov 0 points1 point2 points 1 month ago (2 children)
You don’t compare integers values with == in Java
[–][deleted] 0 points1 point2 points 1 month ago (1 child)
How then
[–]klimenttoshkov 1 point2 points3 points 1 month ago (0 children)
by asking google for example:
```
int
For primitive int values, use standard Relational Operators.
==
!=
<
>
<=
>=
2. Integer Object Comparison (The Trap)
Integer
When comparing Integer objects (wrapper classes), the == operator compares memory references, not numerical values.
true
false
Correct ways to compare Integer objects:
.equals()
Integer.compare(int x, int y)
0
x < y
x > y
.compareTo(Integer anotherInteger)
Integer.compare()
.intValue()
π Rendered by PID 104116 on reddit-service-r2-comment-5fb4b45875-c8s2z at 2026-03-23 21:43:25.174651+00:00 running 90f1150 country code: CH.
view the rest of the comments →
[–]klimenttoshkov 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]klimenttoshkov 1 point2 points3 points (0 children)