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

Why is core java important?

1085


What do you mean by checked exceptions?

998


What is the use of jtable?

1166


What state does a thread enter when it terminates its processing in java programming?

1088


What are the major drawbacks of external iteration?

1101


Is string pool garbage collected?

1068


Can we overload the methods by making them static?

1045


What is currentthread()?

1060


Define inheritance?

1074


What is a 16 bit word?

1070


Can you sort a list in java?

1029


What happens to a static var that is defined within a method of a class?

1079


Is it possible for a yielded thread to get chance for its execution again?

993


Is an empty arraylist null?

1143


What are the advantages of user defined functions?

1064