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
Which access specifier can be used with class ?
What is visibility mode?
Difference between static synchronization vs. Instance synchronization?
What is proper subset?
Explain the use of volatile field modifier?
What are the different types of garbage collectors in java?
Can list contain null in java?
Write a program to find the whether a number is an Armstrong number or not?
What is default locale java?
What a static class can contains?
what are the methods in object?
Can we overload the main() method?
How do you do a line break in java?
Why java is said to be pass-by-value ?
Can an abstract class be a final class?