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
Why is it called boolean?
Describe the syntax of multiple inheritance? When do we use such an inheritance?
Can we sort arraylist in java?
Why vector class is used?
worst case complexities of Quick sort and Merge sort.
What do you understand by classes in java?
What is the longest unicode character?
what is the difference between yielding and sleeping? : Java thread
What is the use of :: in java?
What is difference between ++ I and I ++ in java?
What is the Scope of Static Variable?
how to create multithreaded program? Explain different ways of using thread? : Java thread
How objects of a class are created if no constructor is defined in the class?
What is a constructor, constructor overloading in java?
Why is multiple inheritance not supported in java?