Java Datatypes

  • + 1 comment

    long 64 –9,223,372,036,854,775,808 to 9 ,223,372,036,854,775,807

    int 32 –2,147,483,648 to 2,147,483,647

    short 16 –32,768 to 32,767

    byte 8 –128 to 127

                                if you recognize the positive number of the primitive variable is alway less with 1, check the Byte the minimum  is -128 and the positive is not 128, its 128 -1 = 127, so we add -1 so we can have the right positive range and have the right value.
    
                                wish i was helpfull