DEV Community

amit7275
amit7275

Posted on

3 3

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay