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 / guest
yes.But you have to cast that variable before adding.
eg:
byte b=(byte)b1+(byte)b2
| Is This Answer Correct ? | 7 Yes | 35 No |
Post New Answer View All Answers
What is a classloader in java?
How is Object Oriented Programming different from Procedure Oriented Programming?
Explain about object oriented programming and its features?
What are peerless components?
Why is serialization required?
What are the different access modifiers available in java?
How many threads does a core java have?
How can a gui component handle its own events in java programming?
Can an interface have a class?
What is the purpose of the main method?
Can we have multiple classes in a single file?
What is the maximum size of byte array in java?
What are the main uses of java?
What is number data type?
Explain the difference between protected and default access.