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
Difference between static synchronization vs. Instance synchronization?
what are abstract functions?
What is function and method in java?
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
What does exp mean in math?
Difference between Linked list and Queue?
Is java util regex pattern thread safe?
Which is better 64 bit or 32 bit?
Can size_t be negative?
What is finally and finalize in java?
What is the intersection and union methods?
What is string array?
Is there any difference between nested classes and inner classes?
What is the exact difference in between unicast and multicast object? Where we will use?
What is the difference between Java1.4 and Java1.5