Explain Difference between Java and C++


C++ is a complex language

Java is Simple Language
C++ has signed and unsigned data types

By default, all data types in java are signed( Exception char)
Characters in C++ are 8 bit and 16 bit chars are represented by wide character types

By default all the characters 16 bit and supports Unicode
C++ supports pointers and pointer arithmetic

No low-level pointers or pointer arithmetic.
Instead have variables and expressions of reference type.
Objects needs to be deallocated explicitly using destructors

Objects are Garbage collected automatically
Variables can be used before its initialization

No Variable can be used before its initialization
Array bounds are not checked by default

Strict array bounds checking
No built in support for multithreading.

Built in support for multithreading
Struct,union , typedef available

No struct, union, typedef—classes and objects are used uniformly instead.
C++ platform dependent

Java is platform independent and machine independent
C++ is less Secure

Java is more Secure

Popular posts from this blog


HSC Exam Time Table 2013 Arts, Commerce, Science

What are cookies and its types? Where are cookies used?