title: The method printf(String, Object...) in the type PrintStream is not applicable for the arguments (String, void)
body: <p>It gives me an error message saying</p>
  
  <blockquote>
    <p>The method printf(String, Object...) in the type PrintStream is not applicable for the arguments (String, void)</p>
  </blockquote>
  
  <p>&nbsp;</p>
  
  <pre><code>public class project {
  
          public static void main(String[] args){
  
          duo duoObject = new duo();
          duo duoObject1 = new duo(5);
          duo duoObject2 = new duo(2,6);
          duo duoObject3 = new duo(3,7,5);
          System.out.printf("%s\n", duoObject.militaryTime());
          System.out.printf("%s\n", duoObject1.militaryTime());
          System.out.printf("%s\n", duoObject2.militaryTime());
          System.out.printf("%s\n", duoObject3.militaryTime());
          }
  
      }
  
  
      public class duo {
          private int hour;
          private int minute;
          private int second;
  
          public duo(){
  
          }
          public duo(int h){
              setHour(h);
          }
          public duo(int h, int m){
              setHour(h);
              setHour(m);
          }
          public duo(int h, int m, int s){
              setHour(h);
              setHour(m);
              setHour(s);
          }
          public void setHour(int h){
              hour = ((h&gt;=0 &amp;&amp; h&lt;24)? h : 0);
          }
          public void setMinute(int h){
              minute = ((h&gt;=0 &amp;&amp; h&lt;60)? h : 0);
          }
          public void setSecond(int h){
              second = ((h&gt;=0 &amp;&amp; h&lt;60)? h : 0);
          }
          public int getHour(){
              return hour;
          }
          public int getMinute(){
              return minute;
          }
          public int getSecond(){
              return second;
          }
          public void militaryTime(){
              System.out.printf("%02d:%02d:%02d", getHour(), getMinute(), getSecond());
          }
      }
  </code></pre>