Possible Duplicate:
Are there inline functions in java?
I come from C++, where I would write
for (int i = 0; i < numNonZero(); ++i)
knowing that numNonZero(), being very small and "inline" would simply vanish from the compiled code. How about in Java? Should I instead have an int _numNonZero in my class and write
for (int i = 0; i < _numNonZero; ++i)
for maximum speed?