TOPUPchat logo...
Forgot password?

Select : C language | Java

Q.2] IDE shows error on line no. 4 select replacement for it from options

1. public class ByteBoat {
2.     public static void main(String[] args){
3.     byte c=125;
4.    c=c+10;  
5.           System.out.println("java");
7.    }
8. }


A) c=(byte)c+10;
B) c=c+(byte)10
C) c=(byte) (c+10)
D) c=c+(short int)10        

Click to See Answer
C) c=(byte) (c+10)    

Next | using different datatype for abject reference

Previous | false as condition in for loop

Hemen Ashodia [paper setter]
Register & recharge
Male Female
I agree Terms and Conditions