Mixing values of fundamental types in an operation:

  1. byte, short, int and long are very closely related: integer types
    float and double are very closely related: float types

    integer types and float types are also "reasonably" closely related


    Most programming languages allow values of closely related types to be mixed in operations.

  2. When different types are used in an operation (+, -, * or /), type conversion is first used to convert one type to the other before the operation can take place.
    Example:
    
        int A;	    - stores integer value
        float B;	    - stores floating point number
    
        A + B           - adding integer and float...
    ... A + B           - integer value is converted to float, then added
    

  3. Question: What kinds of conversion should a programming language allow ???