Java editor/compiler for Mac?

I am in an intro to computer science class in college. I am in need of a java editor/compiler for Mac. I know terminal can compile but I don't know how to use it. Are there any easy to install java programs? My professor only knows how to work Windows. Help would be appreciated!!!