Saturday, October 2, 2010

Pearl #1

This is something that I have never envisioned...
throw null

can you guess what happens?

2 comments:

  1. I throws a NullPointerException.

    ReplyDelete
  2. isn't it beautiful in some sort of weird, twisted way? I'd never though of throwing null... And the exception comes not from the code that throws but from the stack trace printing part or some other default exception handling (which kinda makes sense).

    ReplyDelete