What are integer overflows and underflows and how to handle
them?
Answer Posted / ramesh kumar
byte b = (byte)250;
Here I assinged the value to b more than the positive range
of byte. So, It leads to overflow and we won't get any
error in compile time or run time.
But some unexpected value will be stored into b. i.e b = -
6. This will affect your logic.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is this () in java?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
Can we convert list to set in java?
How will you compute size of a structure?
Does constructor be static?
What is Session reduplication and how its done?
What is a text string?
What must a class do to implement an interface in java programming?
Which is best ide for java?
What is mean by collections in java?
What is the similarity between dynamic binding and linking?
How can we make sure main() is the last thread to finish in java program?
Explain the difference between an Interface and an Abstract class?
What is static synchronization?
What is the difference between interface & abstract class?