Spec-Zone .ru
спецификации, руководства, описания, API
|
This section describes some of the methods in System
that aren't covered in the previous sections.
The arrayCopy
method efficiently copies data between arrays. For more information, refer to
Arrays in the
Language Basics lesson.
The
currentTimeMillis
and
nanoTime
currentTimeMillis
twice, at the beginning and end of the interval, and subtract the first value returned from the second. Similarly, invoking nanoTime
twice measures an interval in nanoseconds.
currentTimeMillis
and nanoTime
is limited by the time services provided by the operating system. Do not assume that currentTimeMillis
is accurate to the nearest millisecond or that nanoTime
is accurate to the nearest nanosecond. Also, neither currentTimeMillis
nor nanoTime
should be used to determine the current time. Use a high-level method, such as
java.util.Calendar.getInstance
The
exit
0
indicates normal termination of the application, while any other value is an error code.