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

How many types of classes are there in java?

1115


How do you implement polymorphism in our day to day life?

3286


What is the use of arraylist in java?

1159


What is constructor and its types?

1209


When is the finally clause of a try-catch-finally statement executed?

1141


Is hashmap thread safe?

1058


Can an integer be a string?

1151


What is regex java?

1171


How to compare two strings in java program?

1104


What are the major drawbacks of external iteration?

1101


What causes memory leak in java?

990


What is module with example?

1099


What are three types of loops in java?

1197


Define an abstract class with reference to java.

1057


Is list ordered in java?

1027