byte a=5;
byte b=5;
byte c=a+b;
System.out.println(c);
whats the o/p?

Answer Posted / kalyan

it will shows complie time error,to execute we typecast the
int to byte

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the inheritance?

721


Why set do not allow duplicates in java?

745


What are class types in java?

774


Explain runtime exceptions?

903


What are the data types supported by java? What is autoboxing and unboxing?

741






Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

793


What is method reference?

698


What is serialversionuid?

751


Define immutable object?

800


How do you bind variables?

745


Can each java object keep track of all the threads that want to exclusively access it?

724


What is hashmap in java?

777


What is a text string?

832


When is finally block not called?

795


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

730