I\'m a newbie Java coder and I just read a variable of an integer class can be described three different ways in the API. I have the following code:
if (count.
You can also use equals:
Integer a = 0;
if (a.equals(0)) {
// a == 0
}
which is equivalent to:
if (a.intValue() == 0) {
// a == 0
}
and also:
if (a == 0) {
}
(the Java compiler automatically adds intValue())
Note that autoboxing/autounboxing can introduce a significant overhead (especially inside loops).