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
How do you sort in java?
Difference between serialization and deserialization in java?
What purpose do the keywords final, finally, and finalize fulfill?
Explain about oops concepts.
Why does abstract class have constructor?
Can we have a method name same as class name in java?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What access modifiers can be used for methods?
What is double checked locking in singleton?
Why should I use abstract class?
Can this keyword be used to refer static members?
What is the difference between jdk and jre?
Can we create more than one object singleton class?
How is abstraction implemented in java ?
List two java ide’s?