<< Chapter < Page | Chapter >> Page > |
I recommend that you open another copy of this document in a separate browser window and use the following links to easilyfind and view the listings while you are reading about them.
This section contains a variety of miscellaneous information.
Financial : Although the Connexions site makes it possible for you to download aPDF file for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF file, youshould be aware that some of the HTML elements in this module may not translate well into PDF.
I also want you to know that, I receive no financial compensation from the Connexions website even if you purchase the PDF version ofthe module.
In the past, unknown individuals have copied my modules from cnx.org, converted them to Kindle books, and placed them for sale onAmazon.com showing me as the author. I neither receive compensationfor those sales nor do I know who does receive compensation. If you purchase such a book, please be aware that it is a copy of a modulethat is freely available on cnx.org and that it was made and published without my prior knowledge.
Affiliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX.
C. Sun Dec 02 17:35:00 CST 2012 1354491300781
The noarg constructor for the Date class
The Date class has a constructor that takes no parameters and is described in the documentation as follows:
"Allocates a Date object and initializes it so that it represents the time at which it was allocated, measured to the nearestmillisecond."
In other words, this constructor can be used to instantiate a Date object that represents the current date and time according to the system clock.
A property named time of type long
The actual date and time information encapsulated in a Date object is apparently stored in a property named time as a long integer.
Milliseconds since the epoch
The long integer encapsulated in a Date object represents the total number of milliseconds for the encapsulated date and time, relative tothe epoch, which was Jan 01 00:00:00 GMT 1970.
Earlier dates are represented as negative values. Later dates are represented as positive values.
An overridden toString method
An object of the Date class has an overridden toString method that converts the value in milliseconds to a form that is more useful for a human observer, such as:
Notification Switch
Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?