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
Is set ordered in java?
Define Multiprogramming and Multiprocessing in java.
What is the covariant return type?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is fundamental datatype?
What is the difference between notify and notifyall method?
Can we increase array size dynamically in java?
Is empty set an element of empty set?
Why is whitespace important?
What is core java used for?
what is the significance of listiterator in java?
What is t in parametric equations?
Why does java not allow multiple public classes in a java file ?
What does the string method compareto () do?
What is pangram in java?