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 is the difference between post and put?

1074


What makes a function well defined?

998


When should we create our own custom exception classes?

1026


What is anti pattern in cyber security?

1038


Write a program to print count of empty strings in java 8?

1013


How will you communicate between two applets?

1177


How would you use Bubble Sort to sort the number of elements?

1011


What is rmi and steps involved in developing an rmi object?

1075


Is null a string?

1014


What is the difference between break and continue statements?

1047


What is the use of default method in interface in java?

1014


How do you define a method?

984


What is difference between iterator access and index access?

1069


Why wait and notify methods are declared in object class?

1046


How objects are stored in java?

1043