Оцените презентацию от 1 до 5 баллов!
Тип файла:
ppt / pptx (powerpoint)
Всего слайдов:
13 слайдов
Для класса:
1,2,3,4,5,6,7,8,9,10,11
Размер файла:
99.00 kB
Просмотров:
57
Скачиваний:
0
Автор:
неизвестен
Слайды и текст к этой презентации:
№1 слайд![. Essential Java Classes .](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img0.jpg)
Содержание слайда: 3. Essential Java Classes
5. Some Useful Classes
№2 слайд![Class System of contains](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img1.jpg)
Содержание слайда: Class System (1 of 2)
contains several useful class fields and methods
it cannot be instantiated
standard input, standard output, and error output streams
gets and sets system properties
№3 слайд![Class System of exit int](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img2.jpg)
Содержание слайда: Class System (2 of 2)
exit(int status) - terminates the currently running Java Virtual Machine
gc() - runs the garbage collector
arraycopy(…) - copies an array
console() - Returns the unique Console object associated with the current JVM
nanoTime() - Returns the current value of the running JVM high-resolution time
See http://docs.oracle.com/javase/7/docs/api/java/lang/System.html for details
№4 слайд![Class Runtime Allows to](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img3.jpg)
Содержание слайда: Class Runtime
Allows to interface with the environment in which the application is running
static getRuntime() - Returns the runtime object associated with the current Java application
freeMemory() - returns the amount of free memory in the JVM
totalMemory() - returns the total amount of memory in the JVM.
№5 слайд![Example of String Command](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img4.jpg)
Содержание слайда: Example of String Command Execution
Runtime r = Runtime.getRuntime();
try{
r.exec("C:\\Program Files\\Mozilla Firefox\\firefox.exe");
}
catch(Exception ex){
System.out.println(ex.getMessage());
}
№6 слайд![Class Properties represents a](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img5.jpg)
Содержание слайда: 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
http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html
№7 слайд![Configuration File Example](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img6.jpg)
Содержание слайда: Configuration File Example
dbpassword=pass&word
database=localhost
dbuser=vmo
№8 слайд![Use Properties Example](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img7.jpg)
Содержание слайда: Use Properties Example
Properties applicationProps = new Properties();
in = new FileInputStream("appProperties");
applicationProps.load(in);
in.close();
String dbInfo = applicationProps. getProperty("database");
№9 слайд![Class Object of The root of](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img8.jpg)
Содержание слайда: Class Object (1 of 2)
The root of the class hierarchy
Every class has Object as a superclass
All objects, including arrays, implement the methods of this class
See http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html for details
№10 слайд![Class Object of equals Object](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img9.jpg)
Содержание слайда: Class Object (2 of 2)
equals(Object obj) - indicates whether some other object is "equal to" this one
getClass() - returns the runtime class of this Object
clone() - creates and returns a copy of this object
toString() - returns a string representation of the object
№11 слайд![Class Random is used to](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img10.jpg)
Содержание слайда: Class Random
is used to generate a stream of pseudorandom numbers
Random(long seed) - creates a new random number generator
nextInt() - returns the next pseudorandom, uniformly distributed int value
nextInt(int n) - returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive)
See http://docs.oracle.com/javase/7/docs/api/java/util/Random.html for details
№12 слайд![Class Math of Contains](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img11.jpg)
Содержание слайда: Class Math (1 of 2)
Contains methods for performing basic numeric operations:
elementary exponential,
logarithm,
square root
trigonometric functions
See http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html for details
№13 слайд![Class Math of sqtr double](/documents_6/b2866aa890157c00c83e2ac5c6265e15/img12.jpg)
Содержание слайда: Class Math (2 of 2)
sqtr(double value)
exp(double value)
log(double value)
power(double value, double p)
sin(double value)
sinh(double value)
toRadians(double value)