Brian's Waste of Time

Tue, 01 Feb 2005

Java Pop Quiz

Without breaking out a compiler, or BeanShell ;-), what is the output from the following:

System.out.println("**" + foo != null ? foo : "NULL" + "**");

If foo is the String "wombats!"? What if foo is null?

;-)

7 writebacks [/src/java] permanent link