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

How do you reverse a word in java?

1017


How can constructor chaining be done using this keyword?

1233


Can you declare a private method as static?

1113


how to handle exceptions in ejb?

2273


What is append function?

953


How to change the priority of thread or how to set the priority of thread?

1001


What is the program development process?

942


Can I uninstall java?

993


Can you extend singleton class?

1056


What is the major difference between linkedlist and arraylist?

987


What is the final field modifier?

943


What is :: operator in java 8?

970


Why stringbuilder is not thread safe?

981


Is there any sort function in java?

1000


Define Multiprogramming and Multiprocessing in java.

1079