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 is an abstract method in java programming?

1052


What is hashtable and explain features of hashtable?

989


Can we override tostring method in java?

975


What loop means?

960


Are maps ordered java?

968


Can I declare class as static or private?

966


What is java life cycle?

1013


Explain method overloading?

1023


What is parameters example?

1040


What are the advantages and disadvantages of reference counting in garbage collection?

1032


How do you pass by reference?

1068


why we use merge option in hybernate pls give a ex snippet

1997


How do you sort in java?

991


Name and explain the types of ways which are used to pass arguments in any function in java.

1082


What is empty string literal in java?

1063