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

Answer Posted / dinesh kumar

compilation fails
possibl;e loss of precision, because
ie type mismatch error from byte to int, instead of byte we
can replace int(before a+b), it will excuite succesfully

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the meaning of 3 dots in java?

676


What is anagram word?

516


If a class is declared without any access modifiers, where can the class be accessed?

588


How many types of operators are there?

514


When is finally block not called?

579






What is difference between public static and void?

476


What is class level lock ?

606


How do you escape in java?

571


What are parameters in a method?

581


What is classes in java?

514


How do you sort arraylist in descending order?

570


What is style and indentation?

541


What is the function of compareto in java?

581


Write a program to print 15 random numbers using foreach of java 8?

539


What is n in java?

533