byte a=5;
byte b=5;
byte c=a+b;
System.out.println(c);
whats the o/p?
Answer Posted / dinesh kumar
compilation fails
possibl;e loss of precision, because
ie type mismatch error from byte to int, instead of byte we
can replace int(before a+b), it will excuite succesfully
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is string passed by reference in java?
Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?
Why is string buffer better than string ?
Write a program to find maximum and minimum number in array?
What is math floor in java?
Explain java code for recursive solution's base case?
How do I print a “?
Is a boolean variable?
what is the purpose of "virtual"?
Can we declare main () method as non static?
Is constructor inherited?
Why java applets are more useful for intranets as compared to internet?
Can we have return statement in finally clause? What will happen?
How we can skip finally block of exception even if some exception occurs in the exception block in java?
Why a dead thread occurs?