title: How to set the number of digits while printing in Java?
body: <p>I couldn't really clarify what I'm asking in the title. I an integer for a day and a month. I have to print the month with a 0 in front of it if it's one digit only.</p>
  
  <p>For example 04 if month = 4 and so on.</p>
  
  <p>This is how it's supposed to look like in C#:</p>
  
  <pre><code>Console.WriteLine("{0}.{1:00}", day, month);
  </code></pre>
  
  <p>Thank you.</p>