DEV Community

amit7275
amit7275

Posted on

Have you expertise in java?just do comment on the output of the below statement.

Are you a Java expert?
can you guess the output of the given statement?
I'm not testing your knowledge so don't hesitate to comment,

 What is the output of 

 System.out.println(0123);

If you are able to give the correct answer, I'm very sure that you had faced this question before.
If not then surely you'll learn some really cool concept of Java ๐Ÿ˜„๐Ÿค—.

Top comments (2)

Collapse
 
theelitegentleman profile image
Buhake Sindi • Edited

Output is 83. The number is in octal.

Conversion: 123 = (1 ร— 8ยฒ) + (2 ร— 8ยน) + (3 ร— 8โฐ) = 83

Collapse
 
amit7275 profile image
amit7275

excellent