You are viewing a single comment's thread. Return to all comments →
long 64 –9,223,372,036,854,775,808 to
int 32 –2,147,483,648 to
short 16 –32,768 to
byte 8 –128 to
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
Thanks for your reply.
I'm aware of the data type ranges.
Simply just inserting the ranges within an if statements isn't enough and doesn't pass you the test cases 3 & 4.
Nevertheless, I've managed to solve the challenge! :D