One Java Tip: “And That’s (not) Final!”

August 2, 2007 — Vladimir Drndarski

Something to watch out for with initialization code is that “final” has three different meanings depending on where it’s used, and it’s easy to get confused. For example, a common mistake is that setting a Collection to final doesn’t make the contents immutable, only the reference to the collection is immutable.

Tags: ,

Leave a Reply

Twitter Updates

  • On a mac it's super easy to encrypt/decrypt a file using openssl 2009-12-02
  • If you don’t think carefully, you might think that programming is just typing statements in a programming language. — Ward Cunningham 2009-12-01
  • Thanks to everyone at my CodeCamp LA presentation, you had great questions and I hope the exercise gave you something to take to work Monday 2009-11-21
  • Turns out my CodeCamp LA presentation made it to the front page of SlideShare today. Must be a slow day. 2009-11-21
  • Scrum has two deliverables, A Product Deliverable and a Capability Deliverable we don't talk up the second enough as agilists 2009-11-21
  • More updates...


Bad Behavior has blocked 68 access attempts in the last 7 days.