Forget code editors for the ipad. What about code editors for the mac?
Your options are jedit (hideous) or smultron (buggy abandonware), or pay through the nose for textmate (also abandonware)...
It's emacs, so there's a bunch of cool stuff, and it's so awesomely hacked and configured that it looks&feels just like a normal mac app.
Hell, because of it I've started using emacs everywhere.
And yes, most on that list cost money. But nothing a couple hours or so of work couldn't cover.
TextWrangler looks like the best free option to me, for those of us who lack the patience to learn emacs and vim.
For java, there's a nice lightweight IDE called jGrasp, that's free.
My favourites are Coda and TextMate though, because they've got the proper Mac sensibility going on. Ie. they're pretty, the menus/panels aren't overcrowded, but there's a lot of power tucked away if you care to become a power-user.