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
Explain about method local inner classes or local inner classes in java?
What is the private method modifier?
What is the difference between this() and super() in java?
What is the difference between C++ and Java and your preferences?
what is the major difference between linkedlist and arraylist in java?
What is the synchronized method modifier?
Is final static java?
What is the difference between iterator and list iterator?
What is void class in java?
Which is bigger float or double java?
What are the four corner stones of oop?
What does string mean in java?
What does java ide mean?
How do I remove a character from a string in java?
What are the Class Libraries ?