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...

byte a=5;
byte b=5;
byte c=a+b;
System.out.println(c);
whats the o/p?

Answer Posted / amulkumar

CE:Type mismatch: cannot convert from int to byte
at byte c=a+b;

to avoid this typecast: byte c=(byte)a+b;
or
int c=a+b;

Is This Answer Correct ?    18 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Static and Dynamic Variables? Differentiate them.

1041


Why static functions are used?

1022


What is off heap memory?

933


What are the different types of multitasking?

1038


What is a treeset in java?

989


What is an class?

961


Is age a discrete variable?

916


What is return in java?

902


What is the difference between abstract class and interface1? What is an interface?

996


Give us the name of the list layoutmanagers in java?

874


Can a abstract class be declared final?

944


Explain features of interfaces in java?

932


Is nullpointerexception checked or unchecked?

965


What is exception handling in java?

976


How to compare strings in java?

916