3. Essential Java Classes. 1. Strings презентация
Содержание
- 2. Strings Strings are a sequence of characters. In the Java
- 3. String Length String palindrome = "А роза упала на лапу Азора";
- 4. Concatenation and addition int a = 5; int b = 3;
- 5. Converting Numbers to Strings The simplest way: String s = ""
- 6. Strings Comparing (1 of 3) String s1 = "hello"; String s2
- 7. Strings Comparing (2 of 3) String s1 = "hello"; String s2
- 8. Strings Comparing (3 of 3) You should use equals method instead
- 9. Some String Methods indexOf(String subString) substring(int posBeg, int posEnd) toUpperCase(),
- 10. indexOf method String palindrome = "Niagara. O roar again!"; System.out.println(palindrome.indexOf("roar"));
- 11. substring Method String palindrome = "Niagara. O roar again!"; System.out.println(palindrome.substring(11,
- 12. replace Method String s = "Niagara. O roar again!"; s =
- 13. split Method String palindrome = "Niagara. O roar again!"; String[]
- 14. String Methods See http://docs.oracle.com/javase/7/docs/api/java/lang/String.html for details
- 15. Exercise 3.1.1. Write a program that computes your initials from
- 16. Exercise 3.1.1. See 311Initials project for the full text.
- 17. Strings and Arrays It is impossible to work with strings as
- 18. String Formatting String s1 = ""; s1 = String.format("a =%1$3d, b
- 19. Format String The format string consists of static text embedded with
- 20. Format Specifiers d formats an integer value as a decimal value.
- 21. Examples of Format Specifiers System.out.format("%1f, %1$+012.10f %n", Math.PI); Output is
- 22. Application main Method Every application must contain a main method whose
- 23. How to Run Application with Arguments in Eclipse Right click on
- 24. Exercise 3.1.2. Create a program that will print every other
- 25. Run Application java app/E312Arguments one two three a b c d
- 26. JAR Files The Java Archive (JAR) file format enables you to
- 27. Create JAR File in Eclipse Open workspace with necessary project Menu
- 28. Run Application java -jar ArgumentSkipper.jar one two three a b c
- 29. String vs StringBuilder Objects of the String class are immutable. A
- 30. StringBuilder Methods (1 of 2) indexOf(String subString) substring(int posBeg, int
- 31. StringBuilder Methods (2 of 2) append(type arg) - appends the argument
- 32. append Method StringBuilder s1 = new StringBuilder("Hello"); s1.append(" world!"); System.out.println(s1);
- 33. insert Method StringBuilder s1 = new StringBuilder("Niagara again!"); s1.insert(7, ". O
- 34. replace Method StringBuilder s1 = new StringBuilder("Niagara. O roar again!"); s1.replace(7,
- 35. reverse Method StringBuilder s1 = new StringBuilder("Niagara. O roar again!"); s1.reverse();
- 36. Exercise 3.1.3. A palindrome is a text phrase that spells the
- 37. Home Exercise 3.1.4. Create a generateString method that gets an
- 38. Manuals http://docs.oracle.com/javase/tutorial/java/data/strings.html
- 39. Скачать презентацию












![split Method
String palindrome = "Niagara. O roar again!";
String[] split Method
String palindrome = "Niagara. O roar again!";
String[]](/documents_3/b8b050658d26a979078a5bc186e30e0a/img12.jpg)
























Слайды и текст этой презентации
Скачать презентацию на тему 3. Essential Java Classes. 1. Strings можно ниже:
Похожие презентации