[Java] Useful Classes: Object,Class,System,Runtime
时间:2010-09-13 来源:web_surf
- Package
java.lang.
- Object
It is the root base class of java classes hierarchy.
- Class
It is in-memory representation of Java class. This representation serves as the starting point for querying class-felated information (such as modifier(static, public\private\protected, abstract, final), field, method).
- System
- Operate input stream, output stream, error output stream
- Get environment
- Get/Set system properties
The system properties are key-value pairs. The default properties provided ty VM are:
java.vendor.url
java.class.path
user.home
java.class.version
os.version
java.vendor
user.dir
user.timezone
path.separator
os.name
os.arch
line.separator
file.separator
user.name
java.version
java.home
- Load library
- Copy array
- Get current time
- Inform VM to run garbage collection at some good time
- Inform to exit VM and stop program
- Runtime
- Add VM shutdown hook
- Load library
- Memory
- Get maximum memory
- Get free/total memory available for the running program
- Execute the specified program in the seperate process
- Inform to stop VM
- Inform to start garbage collection
- xxx
相关阅读 更多 +