what is the difference between c++ and java?

Banned
13Oct2011,13:23   #1
nisha134's Avatar
reply me...thanks in advance..
Go4Expert Member
13Oct2011,15:54   #2
neeraj_77's Avatar
Within a software engineering point of view, Java seems to be the more robust programming language among Java/C++. The language catches some of the ugly design and implementation features that C++ offers. The memory management based on garbage collection makes code more robust and might allow faster development. Concerning highly optimized code, C++ may be the choice.
Banned
24Oct2011,10:39   #3
raixyz's Avatar
The main difference between c++ and java is that 'C++ does
not allow persistence because it does not support database
connection while Java allows persistence because it
supports database connection'.
Banned
21Nov2011,15:48   #4
archanababu's Avatar
Java written in class modules but c++ is an Object Oriented Programming
Go4Expert Member
23Nov2011,16:45   #5
Trinity's Avatar
Major Broad differences between Java and C++ are:

1. Portability - C++ sources are required to be compiled for a particular system, to execute on that system only, whereas Java compiles to a byte code which just needs a JVM (Java virtual machine), and hence, can run the byte code compiled for any platform.

2. Memory management - C++ programing expects programmers to manage the memory allocated on heap using new and delete(), whereas Java handles the memory cleanup itself internally. Java programmer does not need to worry about freeing up any memory allocated.

3. Organization - C++ generally have individual classes which can be included in namespaces in case of same class names, however Java classes work in packages i.e. each Java class must be a part of a package and each class is identified by its package. i.e. absolute class name would include the package name.

4. UI - In general Java is considered better and efficient for UI handling.

There might be many other differences, but above mentioned are the major ones as far as I've come across.
Ambitious contributor
23Nov2011,17:09   #6
jhonden's Avatar
Java is platform independent language and C++ is not moreover Java does not support type definition or pre processor. Java supports classes which PHP doesn't.