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 access modifiers can be used for variables?
What are methods?
What is independent and dependent variables in research?
How do you remove spaces in java?
What is the difference between Grid and Gridbaglayout?
Explain different forms of polymorphism?
worst case complexities of Quick sort and Merge sort.
Is java hard to learn?
Is upper case in java?
How do you override a method?
Can we extend singleton class?
What is the difference between final, finally and finalize()?
Why is stringbuffer faster than string?
What is vector?
Explain about assignment statement?