/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// your code goes here
calBefore.set(2013, 12, 31);
calBefore.getTime().getTime();
calAfter.set(2014, 01, 02);
calAfter.getTime().getTime();
long difference = calAfter.getTime().getTime() - calBefore.getTime().getTime();
System.
out.
println("日付の差は" + difference
/ 1000 / 60 / 60 / 24 + "日です。");
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCQkKCQlDYWxlbmRhciBjYWxCZWZvcmUgPSBDYWxlbmRhci5nZXRJbnN0YW5jZSgpOwoJCWNhbEJlZm9yZS5zZXQoMjAxMywgMTIsIDMxKTsKCQljYWxCZWZvcmUuZ2V0VGltZSgpLmdldFRpbWUoKTsKCQkKCQlDYWxlbmRhciBjYWxBZnRlciA9IENhbGVuZGFyLmdldEluc3RhbmNlKCk7CgkJY2FsQWZ0ZXIuc2V0KDIwMTQsIDAxLCAwMik7CgkJY2FsQWZ0ZXIuZ2V0VGltZSgpLmdldFRpbWUoKTsKCQkKCQkKCQlsb25nIGRpZmZlcmVuY2UgPSBjYWxBZnRlci5nZXRUaW1lKCkuZ2V0VGltZSgpIC0gY2FsQmVmb3JlLmdldFRpbWUoKS5nZXRUaW1lKCk7CgkJU3lzdGVtLm91dC5wcmludGxuKCLml6Xku5jjga7lt67jga8iICsgZGlmZmVyZW5jZSAvIDEwMDAgLyA2MCAvIDYwIC8gMjQgKyAi5pel44Gn44GZ44CCIik7CgkJCgl9Cn0=