Java int type convert day/hour/minute to minutes

Description

Java int type convert day/hour/minute to minutes


public class Main {
    public static void main(String[] argv) throws Exception {
        int day = 2;
        int hour = 2;
        int min = 2;
        System.out.println(dayHourMinConvertMin(day, hour, min));
    }//from w  w w .j a va2s . c  o m

    public static int dayHourMinConvertMin(int day, int hour, int min) {
        int days = day * 24 * 60;
        int hours = hour * 60;
        return days + hours + min;
    }
}



PreviousNext

Related