/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Time; public class Time { int hours, minutes, whileHours=hours, whileMinutes=minutes; double doubleDecimal; Time(int hr, int min){ this.hours = hr; this.minutes = min; } Time(double hrmin){ this.doubleDecimal = hrmin; } @Override public String toString(){ return hours + ":" + minutes; } public static void main(String[] args) { System.out.println(new Time(9,30)); System.out.println(new Time(21,30)); System.out.println(new Time(10,93)); while (whileMinutes > 59) { whileHours = hours + 1; whileMinutes = minutes - 60; } } }