-4

Please anyone tell me how I got 55 answer for the below code.

byte myByte = 067;

System.out.println("Byte value: " + myByte);

I got answer as below Byte value: 55

Thanks.

Murat Karagöz
  • 35,401
  • 16
  • 78
  • 107

1 Answers1

1

067 is octal number notation in Java (due to leading 0).

OCT 67 = 6*8 + 7 = 55

Jiri Tousek
  • 12,211
  • 5
  • 29
  • 43