Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is a char always 1 byte?

990


What is data movement?

1138


What is a string what operation can be performed out with the help of a string?

1051


Can we overload the methods by making them static?

1002


When parseint method can be used?

951


How to instantiate static nested classes in java?

1089


What do you mean by object?

979


Give the hierarchy of inputstream and outputstream classes.

1101


Why java does not support pointers?

1041


What will be the output of round(3.7) and ceil(3.7)?

1120


What is the difference between a choice and a list?

1080


What are different type of exceptions in java?

972


What do you mean by stream pipelining in java 8?

1229


Which are the two subclasses under exception class?

1092


Can java run on google chrome?

1195