Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Locale;

public class Main {
    /**
     * Format minutes for display.
     * @param minutes to be formatted
     * @return String representation of minutes as "hh:mm"
     */
    public static String formatMinutes(int minutes) {
        return String.format(Locale.getDefault(), "%d:%02d", minutes / 60, (minutes % 60));
    }
}