java and c++ are use in different field of computer.
using java and c++ to create software, to make some things easy.
Java is not just a language but you can see it as a technology...
u use java on the web.. on desktops.. in mobile phones.. PDAs... embedded systems etc...
java provides a great deal of flexibility while choosing a platform.. a code developed in java for a web application can be reused for a mobile application( No jokes intended) java is far more secure, safe and robust than .net. Though programming in .net may seem a little easy with drag and drop facilities but i find java more easier you can simplify development in java using IDEs like net beans etc.
Many companies have made a decision to use Java as the language for their software development. As the first interactive language for the Web content, Java got a good head-start, resulting in a good base of experience and skills among programmers. With Sun Microsystems' committment to Java, it looks like Java is a good choice for Internet content development