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
Write a function to find out longest palindrome in a given string?
What is the purpose of declaring a variable as final?
What is application tier?
When to use runnable interface vs thread class in java?
What is the intersection and union methods?
What is meant by vector class, dictionary class, hash table class, and property class?
What do you mean by platform independence? What is an interface?
What is callablestatement? How you can call stored procedure to pass in parameter?
Explain about main() method in java ?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
what is function overloading in java?
What is the lifetime and scope of a variable?
What is unmodifiable list in java?
What does flagged out mean?
What are the steps involved to create a bean?