BIRT 3.7
Written by: Michael Williams
Featured Refcardz: Top Refcardz:
  1. Scrum
  2. Apache Maven 2
  3. Essential MySQL
  4. Node.js
  5. Groovy
  1. jQuery Selectors
  2. Ajax
  3. Java
  4. Spring Config.
  5. Java Concurrency

Link Details

Link 165594 thumbnail
User 174929 avatar

By jackolo
via codervirtue.blogspot.com
Published: Mar 17 2009 / 11:07

There is a proposal to introduce a new ?. operator in Java 7 that would allow to call a method on a null object without throwing a NullPointerException and return null or a default value in case of primitives, which often is semantically wrong. The post proposes a way to treat what the method returns when called on a null object is an implementation detail of that method, and how to specify it in the method's body.
  • 6
  • 1
  • 2062
  • 2

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (1)