|
|
Deprecated Methods
The first column in the following table lists the methods in theSystemclass that are deprecated in the JDK 1.1. The second column lists alternatives for those methods:
Deprecated Methods Alternatives getenv(String)getProperty(String)The
getenvmethod has been out of use for several releases of the JDK. The 1.1 release formalizes this change by deprecating the method. Programmers should usePropertiesto store information between invocations of a program. Setting Up and Using Propertiestalks about how to use the
Propertiesclass and Managing Locale-Sensitive Datashows you how to use properties to help internationalize your Java programs.
New Methods
The following methods were added to theSystemclass for the JDK 1.1:ThesetErr(PrintStream) setIn(InputStream) setOut(PrintStream) runFinalizersOnExit(boolean) identityHashCode(Object)setErr,setIn, andsetOutmethods reassign the standard error, standard input and standard output streams, respectively. The Standard I/O Streams in this lesson discusses these streams.
runFinalizersOnExitdetermines whether or notfinalizemethods are invoked when a program is exiting. By default, this is turned off. Cleaning Up Unused Objectstalks about
finalizemethods and garbage collection in more detail.
identityHashCodereturns a hash code for the specified object. Hash codes are not covered in this tutorial. Use the online API documentation for theObjectclass for information.
|
|