Re: Stupidest code of the day

From: Jesper Nordenberg (megagurka_at_yahoo.com)
Date: 01/20/05


Date: 20 Jan 2005 00:07:08 -0800

akizub@yahoo.com wrote in message news:<1106165953.163447.184610@c13g2000cwb.googlegroups.com>...
> The same is here. See the difference:
> Foo foo=null;
> System.out.println(""+foo);
> or
> System.out.println(foo);
>
> So, the first one make perfect sense! When second one crashes flow.

Neither example crashes or throws an exception, they both just print
"null". What's your point?

/Jesper