byte a=5;
byte b=5;
byte c=a+b;
System.out.println(c);
whats the o/p?
Answer Posted / amulkumar
CE:Type mismatch: cannot convert from int to byte
at byte c=a+b;
to avoid this typecast: byte c=(byte)a+b;
or
int c=a+b;
| Is This Answer Correct ? | 18 Yes | 6 No |
Post New Answer View All Answers
What are the Static and Dynamic Variables? Differentiate them.
Why static functions are used?
What is off heap memory?
What are the different types of multitasking?
What is a treeset in java?
What is an class?
Is age a discrete variable?
What is return in java?
What is the difference between abstract class and interface1? What is an interface?
Give us the name of the list layoutmanagers in java?
Can a abstract class be declared final?
Explain features of interfaces in java?
Is nullpointerexception checked or unchecked?
What is exception handling in java?
How to compare strings in java?