Презентация 3. Essential Java Classes. 1. Strings онлайн
На нашем сайте вы можете скачать и просмотреть онлайн доклад-презентацию на тему 3. Essential Java Classes. 1. Strings абсолютно бесплатно. Урок-презентация на эту тему содержит всего 38 слайдов. Все материалы созданы в программе PowerPoint и имеют формат ppt или же pptx. Материалы и темы для презентаций взяты из открытых источников и загружены их авторами, за качество и достоверность информации в них администрация сайта не отвечает, все права принадлежат их создателям. Если вы нашли то, что искали, отблагодарите авторов - поделитесь ссылкой в социальных сетях, а наш сайт добавьте в закладки.
Презентации » Устройства и комплектующие » 3. Essential Java Classes. 1. Strings
Оцените!
Оцените презентацию от 1 до 5 баллов!
- Тип файла:ppt / pptx (powerpoint)
- Всего слайдов:38 слайдов
- Для класса:1,2,3,4,5,6,7,8,9,10,11
- Размер файла:178.00 kB
- Просмотров:56
- Скачиваний:0
- Автор:неизвестен
Слайды и текст к этой презентации:
№18 слайд
![String Formatting String s](/documents_6/b8b050658d26a979078a5bc186e30e0a/img17.jpg)
Содержание слайда: String Formatting
String s1 = "";
s1 = String.format("a =%1$3d, b =%2$7.2f, b = %2$6.4e",
12, 122.589);
Output: a = 12, b = 122,59, b = 1.2259e+02
s1 = String.format("a =%1$3d, a =%1$4o, a = %1$2x", 43);
Output: a = 43, a = 53, a = 2b
See http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html for details
№19 слайд
![Format String The format](/documents_6/b8b050658d26a979078a5bc186e30e0a/img18.jpg)
Содержание слайда: Format String
The format string consists of static text embedded with format specifiers
Except for the format specifiers, the format string is output unchanged
Format specifiers begin with a % and end with a 1- or 2-character conversion that specifies the kind of formatted output being generated
№21 слайд
![Examples of Format Specifiers](/documents_6/b8b050658d26a979078a5bc186e30e0a/img20.jpg)
Содержание слайда: Examples of Format Specifiers
System.out.format("%1f, %1$+012.10f %n", Math.PI);
Output is 3.141593, +03.1415926536
System.out.format("%1$5s %2$7.5f", "e = ", Math.E);
Output is e = 2.71828
See for detailes http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax
№22 слайд
![Application main Method Every](/documents_6/b8b050658d26a979078a5bc186e30e0a/img21.jpg)
Содержание слайда: Application main Method
Every application must contain a main method whose signature is:
public static void main(String[] args)
The main method accepts a single argument: an array of elements of type String
This array is the mechanism through which the runtime system passes information to your application:
java MyApp arg1 arg2
№24 слайд
![Exercise . . . Create a](/documents_6/b8b050658d26a979078a5bc186e30e0a/img23.jpg)
Содержание слайда: Exercise 3.1.2.
Create a program that will print every other argument given on the command line. If the program was executed with the following on the command line,
java ArgumentSkipper one two three a b c d
the program would print
one three b d
Consider how your program would operate when no arguments are given
№27 слайд
![Create JAR File in Eclipse](/documents_6/b8b050658d26a979078a5bc186e30e0a/img26.jpg)
Содержание слайда: Create JAR File in Eclipse
Open workspace with necessary project
Menu item File / Export
Choose Java / Runnable JAR file in “Select an export destination”, then Next
Select your project in “Launch configuration” dropdown list
Fill “Export destination” field with JAR file name (Browse button can be used)
Click Finish button
№31 слайд
![StringBuilder Methods of](/documents_6/b8b050658d26a979078a5bc186e30e0a/img30.jpg)
Содержание слайда: StringBuilder Methods (2 of 2)
append(type arg) - appends the argument to the string
insert(int offset, type arg) - inserts the second argument into the string from offset
replace(int start, int end, String s) - replaces the specified characters in this string
reverse() - reverses the sequence of characters in this string
See http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html for details
№36 слайд
![Exercise . . . A palindrome](/documents_6/b8b050658d26a979078a5bc186e30e0a/img35.jpg)
Содержание слайда: Exercise 3.1.3.
A palindrome is a text phrase that spells the same thing backward and forward. The word redivider is a palindrome, since the word would spell the same even if the character sequence were reversed. Write a program that takes a word as an argument and reports whether the word is a palindrome
№37 слайд
![Home Exercise . . . Create a](/documents_6/b8b050658d26a979078a5bc186e30e0a/img36.jpg)
Содержание слайда: Home Exercise 3.1.4.
Create a generateString method that gets an integer argument n and returns a string contains first n integer numbers with gaps between them
Create a generateStringBuilder method that does the same with StringBuilder class
Compare these methods performance (with help of System.nanoTime();)
Скачать все slide презентации 3. Essential Java Classes. 1. Strings одним архивом:
Похожие презентации
-
3. Essential Java Classes 5. Some Useful Classes
-
3. Essential Java Classes 3. Date and Time Home Tasks
-
3. Essential Java Classes. 3a. Date and Time in Java SE8
-
3. Essential Java Classes 3. Date and Time
-
Mathematical functions, characters, and strings. Introduction to Java Programming
-
Встроенные объекты Java Script Array String Date
-
String Regular Expression. Java Core
-
Java. SE. 03. Класс String
-
Тип String (java)
-
Computer Programming Essentials Java Java Technologies