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