img
a
=
ABCDEFGHIJ
b
=
ABCDEFGHIJ
a
=
AABCDEFGHI
b
=
BCDEFGHIJJ
Environment Properties
The following properties are available:
file.separator
java.specification.version
java.vm.version
java.class.path
java.vendor
line.separator
java.class.version
java.vendor.url
os.arch
java.compiler
java.version
os.name
java.ext.dirs
java.vm.name
os.version
java.home
java.vm.specification.name
path.separator
java.io.tmpdir
java.vm.specification.vendor
user.dir
java.librar y.path
java.vm.specification.version
user.home
java.specification.name
java.vm.vendor
user.name
java.specification.vendor
You can obtain the values of various environment variables by calling the
System.getProperty( ) method. For example, the following program displays the
path to the current user directory:
class ShowUserDir {
public static void main(String args[]) {
System.out.println(System.getProperty("user.dir"));
}
}
Object
As mentioned in Part I, Object is a superclass of all other classes. Object defines the
methods shown in Table 16-14, which are available to every object.
Method
Description
Object clone( )
Creates a new object that is the same as the
throws
invoking object.
CloneNotSuppor tedException
boolean equals(Object object)
Returns true if the invoking object is equivalent to
object.
void finalize( )
Default finalize( ) method. This is usually overridden
throws Throwable
by subclasses.
TABLE 16-14
The Methods Defined by Object
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home