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
Give the hierarchy of inputstream and outputstream classes.
If a variable is declared as private, where may the variable be accessed?
Can an interface extend a class?
Can we override a variable in java?
How to declare an arraylist in java?
How does multithreading take place on a computer with a single cpu in java programming?
What is the latest version of java?
What language is pass by reference?
What is number data type?
Can we have try block without catch block?
when you will synchronize a piece of your code? : Java thread
How do you use nextline in java?
How do you calculate square roots?
What is the difference between this() and super() in java?
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application