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 default locale java?
Difference between Linked list and Queue?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
Can we define static methods inside interface?
What is nested top-level class?
What are the two types of streams offered by java 8?
What are the different types of methodologies?
What is type safety in java?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
Objects or references which of them gets garbage collected?
What are the features of java?
How to make a class or a bean serializable?
Which is fastest collection in java?
What is the lifetime and scope of a variable?
What do you mean by access modifier?