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 / m. abhishek
yes, but u require type casting because the the binary
operation in java should atleast returns Integer values
example :
byte a=12;
byte b=23;
// byte c=a+b; //Not OK,bcoz a+b is an int value
int c=(byte)a+b; // OK
| Is This Answer Correct ? | 34 Yes | 7 No |
Post New Answer View All Answers
Can we rethrow the same exception from catch handler?
worst case complexities of Quick sort and Merge sort.
What are the special characters?
What is the purpose of the system class in java programming?
Difference between string, stringbuffer and stringbuilder?
What are register variables what are the advantages?
What is gc()?
What are the types of arrays in java?
What do you mean by jjs in java8?
Why chararray() is preferred over string to store the password?
What is the difference between jdk and jre?
Explain about the performance aspects of core java?
what are the methods in object?
How do I get 64 bit java?
Can the garbage collection be forced by any means?