When you print don't you access the toString() method?
So isn't null.toString being called which should result in a NullPointerException?
I know this doesn't happen in reality, but it seems like null is being special cased in order to prevent this happening in the case of printing. For example in C you won't print out null just because you passed in a null pointer. This is something that has bothered me since I first came across it in
Java and I would like someone to explain how this works?