title: Why int j = 012 giving output 10?
body: <p>In my actual project It happened accidentally here is my modified small program.</p>
  
  <p>I can't figure out why it is giving output <strong>10</strong>?</p>
  
  <pre><code>public class Int
  {
      public static void main(String args[])
      {
          int j=012;//accidentaly i put zero 
          System.out.println(j);// prints 10??
      }
  }
  </code></pre>
  
  <p>After that, I put two zeros still giving output 10.</p>
  
  <p><strong>Then I change <em>012 to 0123</em> and now it is giving output 83?</strong></p>
  
  <p>Can anyone explain why?</p>