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 an abstract method in java programming?
What is hashtable and explain features of hashtable?
Can we override tostring method in java?
What loop means?
Are maps ordered java?
Can I declare class as static or private?
What is java life cycle?
Explain method overloading?
What is parameters example?
What are the advantages and disadvantages of reference counting in garbage collection?
How do you pass by reference?
why we use merge option in hybernate pls give a ex snippet
How do you sort in java?
Name and explain the types of ways which are used to pass arguments in any function in java.
What is empty string literal in java?