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 are pointers not secure?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What happens when main () method is declared as private?
Is java a compiler?
What is meant by method?
What is a class object?
Is java hashset ordered?
Does isempty check for null?
What are the data types supported by java?
What is the reflection?
Why java is called not pure object oriented language?
Why stringbuffer is faster than string?
What is a singleton factory?
Is sizeof a preprocessor?
Can we have any code between try and catch blocks?