Create Clock with Drive

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 *
 * @author elacy
 */
public class clock2 {

    public int hours = 1;
    public int minutes = 2;
    public int second = 3;
   
    public String toMilitary(){
        return String.format("%02d:%02d: %02d", hours,minutes, second);
   }


   public String toString(){
           return String.format("%02d:%02d:%02d %s", ((hours==0 || hours==12)?12:hours%12),minutes, second,(hours <12?"AM":"PM"));
           
  }
}