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

Can we create more than one object singleton class?

1021


Can we use switch statement with strings?

1026


What type of language is java?

981


How many bytes is a string?

1117


What is module in project?

946


Can I declare class as static or private?

941


What is class forname?

1000


What is the difference between integer parseint and integer valueof?

992


Can main() method in java can return any data?

1157


What are heterogeneous objects?

1017


What is consumer interface?

977


Explain the scope of a variable.

1074


Can we have return statement in finally clause? What will happen?

942


What is java lang string?

966


What is Garbage Collection in Java

1061