Archive for June 24th, 2008



Null is throwable

Today I found a cute code snippet on Alex‘s Blog and Euxx: 1public class Weird { 2 3 public static void main(String[] args) { 4 throw null; 5 } 6 7} It compiles and trows a NullPointerException: Exception in thread “main” java.lang.NullPointerException at Weird.main(Weird.java:4) I think that it is strange that this stuff compiles: the [...]




About

You are currently browsing the NewInstance weblog archives for the day Tuesday, June 24th, 2008.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Calendar

June 2008
M T W T F S S
« May   Jul »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Follow me

twitter flickr LinkedIn feed

Enter your email address:

Archives


Categories

Tag Cloud