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 is the super void?
Why do we need data structure in java?
What do you understand by an io stream?
How infinite loop is declared?
What is private static in java?
What is the difference between serializable and externalizable interface?
What is operator overloading. Is it is supported in java?
What is difference between equal and == in java?
Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification
how are methods defined?
Explain about arraylist?
What is connection class in java?
Is 0 true or false in java?
What is a layout manager and what are different types of layout managers available in java awt?
What is nested loop? What is dangling else condition in it?