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

How do I enable java in safari?

540


How do you create a sop?

524


What is an 8 bit word?

586


Can classes declared using the abstract keyword cab be instantiated?

552


Can I declare class as static or private?

535






can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread

528


How can we achieve thread safety in java?

676


What is the difference between integer parseint and integer valueof?

542


How do you sing an Applet ?

2026


What is the statements?

585


What is the method to expand and collapse nodes in a jtree?

603


What are different data types?

562


What is meant by class?

537


Explain the scope or life time of class variables or static variables?

511


How many characters is 16 bytes?

531