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
Why is core java important?
What do you mean by checked exceptions?
What is the use of jtable?
What state does a thread enter when it terminates its processing in java programming?
What are the major drawbacks of external iteration?
Is string pool garbage collected?
Can we overload the methods by making them static?
What is currentthread()?
Define inheritance?
What is a 16 bit word?
Can you sort a list in java?
What happens to a static var that is defined within a method of a class?
Is it possible for a yielded thread to get chance for its execution again?
Is an empty arraylist null?
What are the advantages of user defined functions?