Just taking the opportunity to point interested parties to the thread over here which started out as a reasonably simple static initialiser question, but includes quite a few interesting points.
You can find the post over here.
The 'trick' involves a static initialiser to print the String, and then calling an explicit exit().
Nice work in using Google's syntaxhighlighter on the code, very pretty.
I'd happy if anyone could point out a real-world application of the code shown, or a reason that knowing this 'trick' makes you a better developer.
The two main points that grate are
- the use of System.exit(), which either makes it non-portable, or crashes the code it gets attached to
- The fact that it fails to initialise the Class, which would result in (if memory serves) a ClassNotFoundException when accessed from that point on.
Agreed that these points are only meaningful if you use the code in conjunction with other code, but then again explain the use of code that cannot be used?
I don't usually waste my time with these things, but it turns out that on Lego Star Wars for the Wii (of which I am a big fan and highly recommend) it doesn't reset the 'Extras' when you load another game.
Therefore I was able to kick up to 3840x cash multiplier and a few other extras in my saved game, which is almost finished, then load my son's game and make a stack of cash for him
News at 7, I guess.
I'll try anything once, sometimes even up to three times for no good reason. Despite having nothing nice to say.
You can find me over here
Update: I use twibble on my Nokia N95, so I can use the GPS, wifi or phone network and it can read my updates for me.

