C++ Vs Java
C++ Vs Java
Object-oriented programming
Java C++
Hybrid between procedural and object-
Pure object-oriented language.
oriented.
All functions (methods) are part of a class. Can have stand-along functions.
No multiple inheritances. Multiple inheritances.
Formal interface specifications. No formal interface specifications.
Generics as parameterized type. Templates as parameterized type.
No operator overloading. Operator overloading.
All methods (except final methods) are dynamically
Virtual functions are dynamically bound.
bound.
____________________________________________________________________________________ 1
Teaches All major subjects for Engineering (BE) / MCA / BCA / Diploma / AMIE / DOEACC Students.
Project Guide for BE / MCA / BCA / Diploma Students
Address:- 80, Ramlal Dutta Road, P.O- Bhadrakali, Dist:- Hooghly, 712232. Rly Station:- Uttarpara
(Nera Amarendra Vidyapith Boys School)
CHANDAN MUKHERJEE 26630615 9831125100
__________________MTech (IT), BE (Computer Science), Diploma (Electrical Engg) _________________
Primitive Types
Java C++
Two type categories. Various type categories.
Separate types for structs, unions, enums, and
All nonprimitive types are objects.
arrays.
All numeric types are signed. Signed and unsigned numeric types.
All primitive types are a fixed size for all
Primitive type size varies by platform.
platforms.
16-bit Unicode characters. 8-bit ASCII characters.
Integer results are interpreted as Boolean
Conditions must be Boolean expressions.
conditions.
Special Characteristics
Java C++
Specifically attuned to network and Web processing. No relationship to networks or the Web.
Automatic garbage collection. No automatic garbage collection.
Combination of compiled and interpreted. Compiled.
Slower execution when interpreted. Fast execution.
Architecture neutral. Architecture specific.
Supports multithreading. No multithreading.
____________________________________________________________________________________ 2
Teaches All major subjects for Engineering (BE) / MCA / BCA / Diploma / AMIE / DOEACC Students.
Project Guide for BE / MCA / BCA / Diploma Students
Address:- 80, Ramlal Dutta Road, P.O- Bhadrakali, Dist:- Hooghly, 712232. Rly Station:- Uttarpara
(Nera Amarendra Vidyapith Boys School)