Java for C++ Developers - Advantages

[package] Next [Start] Start Sub-systems can be modelled with packages

Object-oriented systems typically consist of groups of classes, or "sub-systems", which provide services, rather than a whole bunch of individual classes. The Java package All pointer manipulation is done by the compiler Automatic garbage collection No need for header files Method functions are "virtual" by default

Designers of a C++ class need to decide which methods could be overriden in the future by derived classes, and declare these methods virtual Rich class library Robust exception handling Standard sizes for basic data types

C++ makes no guarantees about the representation of basic data types. Simple types like int and float Casts used to enforce type safety

Casting between different types in C++ is used to bypass the compiler's type checking. In Java it's the opposite - it enforces Built-in multi-threading

Java has built-in support for spawning and controlling multiple threads of control in a single process.

[package] Next [Start] Start