How does Java differ from C/C++?
How does Java differ from C/C++?
- Primitive Datatypes
- boolean,char,byte,short,int,long,float,double.boolean is a 1 bit value (true, false)char is a 16 bit Unicode character
- constants are declared as: public final static PI = 3.14159;
- Derived Types
- There are only two ways of constructing derived types from the primitives types: classes & arrays
- Instances of derived types are handled by reference.whereas primitive types are handled by value.