how can i fetch current date and time of my system in java without using any predefined classes or libraries?
i am actually making a Date ADT of my own from scratch as java.util.Date or Java.util.Calendar. but i am not able to find out a way to fetch system date and time, say to calculate age of somebody if he enters his current age.
in a way i want to learn how they developers of Date or Calendar class actually implemented it. is there a way that i can see the code of Date and Calendar classes defined in java.util package.
how can i fetch current date and time of my system in java without
Share
Using System.currentTimeMillis():
As for the source code of
java.util.Dateandjava.util.Calendar, you can either download the source directly from http://jdk7.java.net/source.html, or view it online indocjar.comor here.