Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int formatStrToIntTime(String time) {
        int colonLocation = time.indexOf(":");
        int minute = Integer.parseInt(time.substring(0, colonLocation));
        int second = Integer.parseInt(time.substring(colonLocation + 1));
        return formatToIntTime(minute, second);
    }

    public static int formatToIntTime(int minute, int second) {
        return minute * 100 + second;
    }
}