Data Types and Type Conversions
Data Types Primitive Data Types: 1) byte 2) short 3) int 4) long 5) float 6) double 7) char 8) boolean Type Conversions:- Conversion one type to another type is called type conversions. types of conversion are divided in to two types 1. Widening or Automatic Type Conversion ( Implicitly) 2. Narrowing Type Conversion ( Explicitly ) over all 56 conversions (8*7=56) boolean type cannot be converted to other types and other types cannot be converted to boolean type.=14(not Possible) Widening or Implicitly Type Conversions:- The following 19 conversions are done by system implicitly: byte to short, int, long, float, double => 5 short to int, long, float, double => 4 int to long, float, double => 3 long to float, double ...




Comments
Post a Comment