Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Date;

public class Main {
    public static int betweenHour(Date from, Date to) {
        long duration = from.getTime() - to.getTime();
        return (int) (duration / (1000 * 60 * 60));
    }
}