title: Difference between kk and HH in date formatting java
body: <p>I'm pretty new to java and am trying to format a time using 24 hour format. I've come across two ways of formatting the hour - HH and kk:</p>
  
  <pre><code>SimpleDateFormat format1 new SimpleDateFormat("HH:mm");
  SimpleDateFormat format2 new SimpleDateFormat("kk:mm");
  Date date = new Date();
  System.out.println(format1.format(date));
  System.out.println(format2.format(date));
  </code></pre>
  
  <p>These both produce something like 11:21. What's the difference between them? Am I missing something?</p>