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
How do you reverse a word in java?
How can constructor chaining be done using this keyword?
Can you declare a private method as static?
how to handle exceptions in ejb?
What is append function?
How to change the priority of thread or how to set the priority of thread?
What is the program development process?
Can I uninstall java?
Can you extend singleton class?
What is the major difference between linkedlist and arraylist?
What is the final field modifier?
What is :: operator in java 8?
Why stringbuilder is not thread safe?
Is there any sort function in java?
Define Multiprogramming and Multiprocessing in java.