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

Answer Posted / janardhan

Above code , there is compile time error will coming, 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 ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is java free for businesses?

663


How do you write a good declaration?

589


Is char a method in java?

616


How do you create a method in java?

622


what is optional in java 8?

676






How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

660


Does substring create a new object?

624


what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread

774


Why java is secure? Explain.

683


What is getclass () getname () in java?

760


What is java thread dump, how can we get java thread dump of a program?

666


Is math class static in java?

718


What do you mean by an interface in java?

658


Is the milky way in a void?

637


What is a map in java?

656