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...

Can we add two byte variables and assign the result to a
byte variable ?
b=b1+b2 where b,b1,b2 are byte types

Answer Posted / rajesh

Yes,the following is the right way to do so
byte b1=21;byte b2=11;
byte b;
b=(byte)(b1+b2);

Is This Answer Correct ?    39 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What access modifiers can be used for variables?

1150


What are methods?

1027


What is independent and dependent variables in research?

874


How do you remove spaces in java?

1034


What is the difference between Grid and Gridbaglayout?

1247


Explain different forms of polymorphism?

1150


worst case complexities of Quick sort and Merge sort.

1034


Is java hard to learn?

911


Is upper case in java?

963


How do you override a method?

1019


Can we extend singleton class?

952


What is the difference between final, finally and finalize()?

1156


Why is stringbuffer faster than string?

923


What is vector?

1065


Explain about assignment statement?

1027