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
Can we extend private class in java?
What is encapsulation in java?
What are the advantages of inner classes?
What is map in java?
What is the parse method in java?
Is math an abstract class in java?
What is boolean in java?
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
Why Java is not pure Object Oriented language?
What is thread count in java?
What is a local block?
what is mutual exclusion? : Java thread
What is empty list in java?
What is callablestatement? How you can call stored procedure to pass in parameter?
How many types of flags are there?