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

Write a function to find out longest palindrome in a given string?

1056


What is the purpose of declaring a variable as final?

973


What is application tier?

1127


When to use runnable interface vs thread class in java?

987


What is the intersection and union methods?

1029


What is meant by vector class, dictionary class, hash table class, and property class?

1161


What do you mean by platform independence? What is an interface?

1037


What is callablestatement? How you can call stored procedure to pass in parameter?

1025


Explain about main() method in java ?

1079


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

1086


what is function overloading in java?

1308


What is the lifetime and scope of a variable?

1022


What is unmodifiable list in java?

967


What does flagged out mean?

1066


What are the steps involved to create a bean?

1161