Tag: Util indicates date () Date class specifies date standard int ring
In the Java core Technology volume, the first date class appears in a very high frequency, so we have a small integration of the date class
The date class has two
The date class represents a specific time class
This constructor assigns a Date object and initializes it to represent the specified number of milliseconds because it is called the "era", which is the standard time of January 1, 1970 00:00:00 GMT.
It's like Greenwich Mean. As a benchmark value exists
Commonly used is date to string type
String s=new Date (0). toString ();
System.out.println (S.tostring ());
Two different date classes use the same method to have different values
If you use Util. The result of a Date;
Thu Jan 08:00:00 CST 1970
If you use SQL. The result of a Date;
1970-01-01
Output the current time (note that the output is now only available in Util. Date; Sql. Date; This output format is not supported)
System.out.println (New Date ());
Java Core Technology Volume One note six date class