i used JCreator when i was on windows to code/compile code for java. i'm taking a computer science course this semester and need to be able to code/compile code on my mac.
Eclipse: Description here. Or go to Eclipse.org to download it directly. I'm using this for a few CS courses now, and our computer science department is pushing it for other projects. It's free, works great, and is easy to use. Granted, I haven't spent much time in XCode, but Eclipse works very well.
If you haven't installed the Apple programming tools and you have a new machine, you should find a folder called Installers in the Applications folder that contains the developer tools.
After that, you'll probably want to take a look at this thread since it's already answering questions about other tools.