Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   what is the difference between c++ and java? (http://www.go4expert.com/forums/difference-cpp-java-t26924/)

nisha134 13Oct2011 13:23

what is the difference between c++ and java?
 
reply me...thanks in advance..

neeraj_77 13Oct2011 15:54

Re: what is the difference between c++ and java?
 
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.

raixyz 24Oct2011 10:39

Re: what is the difference between c++ and java?
 
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'.

archanababu 21Nov2011 15:48

Re: what is the difference between c++ and java?
 
Java written in class modules but c++ is an Object Oriented Programming

Trinity 23Nov2011 16:45

Re: what is the difference between c++ and java?
 
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.

jhonden 23Nov2011 17:09

Re: what is the difference between c++ and java?
 
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.


All times are GMT +5.5. The time now is 14:11.