Java OCA OCP Practice Question 970

Question

Which of the following are legal? (Choose all that apply.)

A.  int a = abcd; 
B.  int b = ABCD; 
C.  int c = 0xabcd; 
D.  int d = 0XABCD; 
E.  int e = 0abcd; 
F.  int f = 0ABCD; 


C, D.

Note

The characters a-f and A-F may be combined with the digits 0-9 to create a hexadecimal literal, which must begin with 0x.




PreviousNext

Related