That's the promise of Java, sadly, the reality isn't always the same. Java Virtual Machines on different platforms often require special code (which kind of defeats the purpose) and most damning of all (especially on the Mac) is that Java has its own library of UI elements. Unless a Java programmer goes out of their way to make sure their app looks like a native app, it often has an unmistakable 'Java look' to it.
Sun now wants you to have all that Java fun on the iPhone. Shortly after the launch of the iPhone SDK, Sun started looking into the possibility of making a Java VM for the iPhone. After some investigating, they are sure that Java ME (that's the version of Java optimized for mobile devices) on the iPhone is possible and Sun wants to bring it to you. I'm sure there are many Java developers out there are very happy to hear this news.