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 / janardhan

Above code , there is compile time error will coming, because
ie type mismatch error from byte to int, instead of byte we
can replace int(before a+b), it will excuite succesfully

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept of proper inheritance?

1054


Can It is possible to synchronize the constructor of a Java Class?

1097


Can you declare the main method as final?

998


What are design patterns and please explain?

1069


What are different types of constants?

1027


What is the association?

965


Can you extend singleton class?

1086


What is a ternary operator in java?

970


What is difference between static and final?

1056


What is the loop in java?

1116


Is there any sort function in java?

1033


How can we break singleton in java?

952


What is a generic type?

1002


What are the 8 data types in java?

980


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1601