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
What do you mean by collectors in java 8?
Define packages in java?
Will the jvm load the package twice at runtime?
What is super in java?
Explain importance of inheritance in java?
What is the significance of continue jump statement? Explain with an example.
What does flag mean in java?
What is a variable in java?
What is purpose of find feature?
what state does a thread enter when it terminates its processing? : Java thread
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
Where local and global variables are stored?
What is string builder in java?
What is the default execution method in java?
What is arraylist e?