Are there any development tools like NetBeans or Eclipse on OS X that I can use to write an application?
Xcode was good for your job. If you want use NetBeans and Eclipse on your Mac, you can download them, too, because they have OS X distributions.
If you are looking for Java development on the Mac, both NetBeans and Eclipse have a distribution for Mac OS X. Xcode also has support for Java, but it is not a Java-centric tool.
There are built-in vim and emacs. Both of them can be used as IDE.
Built-in vim and emacs don't have GUI (only console versions) but at least they are relatively new in latest OSX versions.
If you want GUI versions there are MacVim and a couple of GUI emacses for OSX.