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 are the rules for naming an array?
What is thread life cycle?
why Java does not support multiple inheritances?
What is the difference between menuitem and checkboxmenu item?
What is java objectoutputstream?
Define linked list and its features with signature?
Is array serializable java?
Is java same as core java?
What is equals method in java?
Is it possible to override the main method?
Can we write class inside a class in java?
Can static methods access instance variables in java?
What is the biggest integer?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
Is it possible to compare various strings with the help of == operator? What are the risks involved?