One, Object
The object class is a superclass of all classes, and all classes inherit directly or indirectly from object
1. How to get a byte-code object
GetClass ()
Class name.
Class.forName
2. ToString Method
Returns the address value of an object in memory, which can be overridden to represent the string form of an object
3. Equals method
The Equals method, which is used to compare two objects, is actually compared with the memory address of two objects. the Equals method inside the object class is used internally by the = = comparison operator.
in development, to compare two objects is the same, often based on the value of the property in the object comparison, that is, in development often requires subclasses to override the Equals method to compare the property values of the object.
Second, System class
The system class contains some useful classes and fields that cannot be instantiated
1. static void Arraycopy (object src, int srcpos, object dest, int destpos, int length):
Copy length elements starting from the Srcpos index of the SRC source array
Place these elements in the dest array starting from the destpost position
2. Static Long Currenttimemillis ()
Millisecond value from midnight January 1, 1970 to current system time
3. static void exit (int status)
Terminating a running Java Virtual machine
4. static void GC ()
Run the garbage collector, the virtual machine has tried its best (not necessarily recycled) to reclaim space from all discarded objects
The Finalize () method that invokes object when the recycle succeeds
Third, date-related classes
1. Date class
(1) Construction method
Date () Creates a Date object for the current system time
Date (long date) creates a time object with a value of 00:00:00date milliseconds from January 1, 1970
2. DateFormat class & SimpleDateFormat
DateFormat is an abstract class of date/time formatting subclasses that formats and resolves dates or times in a language-independent manner.
Date/time formatting subclasses (such as the SimpleDateFormat class ) allow formatting (that is, date -and text), parsing (text-to-date), and normalization.
(1) String format (date date)
Convert Date to String
(2) Date Parse (String source)
Converts a date in string form to a type of date
Java--api