To get the java compiler go to http://java.sun.com/
This is the compiler released by the people who wrote Java, and so is good. By the sounds of things I would advise you to learn Java first, if you would like to be able to quickly and easily write complete programs. There is also much better documentation for Java, and as it is written by one company, it is much mored focused.

C / C++ is a much more confusing topic, and open to discussion.

GCC (Gnu C Compiler) is an open source compiler, and is availaibe for free for Linux.
There is also a version availialbe for Windows, go have a look for MinGW.

For a Windows C Compiler (A C Compiler written for Windows, and so is much faster), then the best option is visual studio.

It really depends on what you are wanting to do, if you would like to write large programs, i.e. big software, games, operating systems, you would use C. Also C is much more basic, and give you more control.