Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.*;

public class Main {
    public static void add(Calendar c, int unit, long increment) {
        while (increment > Integer.MAX_VALUE) {
            c.add(unit, Integer.MAX_VALUE);
            increment -= Integer.MAX_VALUE;
        }
        c.add(unit, (int) increment);
    }
}