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

Are arrays static in java?

590


What are abstract methods in java?

658


What are the two types of java?

522


Describe the Big-O Notation.

619


What do you mean by mnemonics?

537






Why is it important to initialize a variable?

496


What is the latest version of java?

588


What is a boolean in java?

581


What is the purpose of extern variable?

544


How do you sort a string in java?

541


What is ordered map in java?

543


How long will it take to learn java?

511


What is sorting algorithm in java?

527


Define interface in java?

609


What is the java virtual machine?

590