Difference between Java And C/C++
Data Types
Data Types
- All java primitives data types (char , int , short , long , byte, float , double and boolean ) have specified sizes and behaviour that are machine-independent .
- Conditional expression can only be boolean , not integral .
- Casting between data types is much more controlled in Java . Automatic conversion occurs only when there is no loss of information . All other casts must be explicit .
- Java supports special methods to convert values between class objects and primitive types .
- Composite data types are accomplished in java using only classes . Structures and unions are not supported .
No comments:
Post a Comment