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
Is integer passed by reference in java?
What is difference between printf and scanf?
how are methods defined?
Explain different types of wrapper classes in java?
What is the difference between a break statement and a continue statement?
Explain parallel processing in java8?
Compare java and python.
What is the constructor?
What is scope of a variable?
What does 0 mean in boolean?
what is static import in java? Explain
Difference between arraylist and hashset in java?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What is function declaration?
What is the difference between java applets and applications?