MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

/*
 * Output: 
    
13263
    
 */

import java.util.Date;

public class MainClass {

    public static void main(String args[]) {
        Date currentDate = new Date();

        long msec = currentDate.getTime();

        long days = msec / (24 * 60 * 60 * 1000);

        System.out.println(days);
    }
}