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 a classloader in java?

968


How is Object Oriented Programming different from Procedure Oriented Programming?

1000


Explain about object oriented programming and its features?

974


What are peerless components?

1035


Why is serialization required?

920


What are the different access modifiers available in java?

989


How many threads does a core java have?

1009


How can a gui component handle its own events in java programming?

986


Can an interface have a class?

956


What is the purpose of the main method?

951


Can we have multiple classes in a single file?

922


What is the maximum size of byte array in java?

969


What are the main uses of java?

941


What is number data type?

978


Explain the difference between protected and default access.

960