Can we add two byte variables and assign the result to a
byte variable ?
b=b1+b2 where b,b1,b2 are byte types
Answer Posted / rajesh
Yes,the following is the right way to do so
byte b1=21;byte b2=11;
byte b;
b=(byte)(b1+b2);
| Is This Answer Correct ? | 39 Yes | 5 No |
Post New Answer View All Answers
What is the difference between post and put?
What makes a function well defined?
When should we create our own custom exception classes?
What is anti pattern in cyber security?
Write a program to print count of empty strings in java 8?
How will you communicate between two applets?
How would you use Bubble Sort to sort the number of elements?
What is rmi and steps involved in developing an rmi object?
Is null a string?
What is the difference between break and continue statements?
What is the use of default method in interface in java?
How do you define a method?
What is difference between iterator access and index access?
Why wait and notify methods are declared in object class?
How objects are stored in java?