Содержание
- 2. Class System (1 of 2) contains several useful class fields and methods it cannot be instantiated
- 3. Class System (2 of 2) exit(int status) - terminates the currently running Java Virtual Machine gc()
- 4. Class Runtime Allows to interface with the environment in which the application is running static getRuntime()
- 5. Example of String Command Execution Runtime r = Runtime.getRuntime(); try{ r.exec("C:\\Program Files\\Mozilla Firefox\\firefox.exe"); } catch(Exception ex){
- 6. Class Properties represents a persistent set of properties as pairs of key-value details are here: http://docs.oracle.com/javase/tutorial/essential/environment/properties.html
- 7. Configuration File Example dbpassword=pass&word database=localhost dbuser=vmo * Infopulse training Center
- 8. Use Properties Example Properties applicationProps = new Properties(); in = new FileInputStream("appProperties"); applicationProps.load(in); in.close(); String dbInfo
- 9. Class Object (1 of 2) The root of the class hierarchy Every class has Object as
- 10. Class Object (2 of 2) equals(Object obj) - indicates whether some other object is "equal to"
- 11. Class Random is used to generate a stream of pseudorandom numbers Random(long seed) - creates a
- 12. Class Math (1 of 2) Contains methods for performing basic numeric operations: elementary exponential, logarithm, square
- 14. Скачать презентацию