Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static Calendar getTomorrowAt(int hours, int minutes) {
        Calendar today = Calendar.getInstance();
        Calendar cal = Calendar.getInstance();
        cal.clear();

        int year = today.get(Calendar.YEAR);
        int month = today.get(Calendar.MONTH);
        //represents the day of the month
        today.add(Calendar.DATE, 1);
        int day = today.get(Calendar.DATE);
        cal.set(year, month, day, hours, minutes, 0);
        return cal;
    }
}