Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
User Journal

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.

This discussion has been archived. No new comments can be posted.

Java hints

Comments Filter:

An authority is a person who can tell you more about something than you really care to know.

Working...