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

Difference between static synchronization vs. Instance synchronization?

1179


what are abstract functions?

1086


What is function and method in java?

999


Can an anonymous class be declared as implementing an interface and extending a class in java programming?

1365


What does exp mean in math?

1054


Difference between Linked list and Queue?

1084


Is java util regex pattern thread safe?

1087


Which is better 64 bit or 32 bit?

988


Can size_t be negative?

1251


What is finally and finalize in java?

1159


What is the intersection and union methods?

1080


What is string array?

1125


Is there any difference between nested classes and inner classes?

1165


What is the exact difference in between unicast and multicast object? Where we will use?

1045


What is the difference between Java1.4 and Java1.5

2392