All pastes #2075827 Raw Edit

Untitled

public text v1 · immutable
#2075827 ·published 2011-06-06 23:31 UTC
rendered paste body
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Time;
 
public class Time {
int hours, 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) {
		int tmp_hours = this.hours;
		int tmp_minutes = this.mintues;
		
        System.out.println(new Time(9,30));
        System.out.println(new Time(21,30));
        System.out.println(new Time(10,93));


       
        while (tmp_minutes > 59) {
            tmp_hours =tmp_hours + 1;
            tmp_minutes = tmp_minutes - 60;
        }
		System.out.println(new Time(tmp_hours,tmp_minutes));
    }
}