Journal seanb's Journal: Java hints
You can write literal longs by just using the 'l' or 'L' suffix. "long val = (long) 42;" is uglier than "long val = 42L;", although the compiler is probably smart enough to sort this out.
Don't iterate a maps keys, then look up each key in the map. Using the for-each loop on the entrySet is cleaner and faster.
I'm a big "final" fan. Use it everywhere you can.
Java hints More Login
Java hints
Slashdot Top Deals