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 / guest

yes.But you have to cast that variable before adding.

eg:
byte b=(byte)b1+(byte)b2

Is This Answer Correct ?    7 Yes 35 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of static methods and variables?

1041


What are the rules for variable declaration?

965


Why do people says “java is robust”?

1027


What is the difference between actual and formal parameters?

941


How do constructors use this() and super()?

1114


What if constructor is protected in java?

1114


How to run a JAR file through command prompt?

1274


What is difference between module and function?

1166


What are the important features of Java 8 release?

1080


Differentiate between vector and array list.

1056


What does sprintf return?

1054


What is a generic code?

1048


When super keyword is used?

1009


What are different data types?

1020


What is lambda in java?

1068