Презентация Lesson 5. Working with Objects онлайн
На нашем сайте вы можете скачать и просмотреть онлайн доклад-презентацию на тему Lesson 5. Working with Objects абсолютно бесплатно. Урок-презентация на эту тему содержит всего 45 слайдов. Все материалы созданы в программе PowerPoint и имеют формат ppt или же pptx. Материалы и темы для презентаций взяты из открытых источников и загружены их авторами, за качество и достоверность информации в них администрация сайта не отвечает, все права принадлежат их создателям. Если вы нашли то, что искали, отблагодарите авторов - поделитесь ссылкой в социальных сетях, а наш сайт добавьте в закладки.
Презентации » Устройства и комплектующие » Lesson 5. Working with Objects
Оцените!
Оцените презентацию от 1 до 5 баллов!
- Тип файла:ppt / pptx (powerpoint)
- Всего слайдов:45 слайдов
- Для класса:1,2,3,4,5,6,7,8,9,10,11
- Размер файла:860.00 kB
- Просмотров:82
- Скачиваний:0
- Автор:неизвестен
Слайды и текст к этой презентации:
№2 слайд
Содержание слайда: Objectives
After completing this lesson, you should be able to:
Declare, instantiate, and initialize object reference variables
Compare how object reference variables are stored in relation to primitive variables
Access fields on objects
Call methods on objects
Create a String object
Manipulate data by using the String class and its methods
Manipulate data by using the StringBuilder class and its methods
Use the Java API documentation
to explore the methods of a
foundation class
№21 слайд
Содержание слайда: String Class
The String class supports some non-standard syntax
A String object can be instantiated without using the new keyword; this is preferred:
String hisName = "Fred Smith";
The new keyword can be used, but it is not best practice:
String herName = new String("Anne Smith");
A String object is immutable; its value cannot be changed.
A String object can be used with the string concatenation operator symbol (+) for concatenation.
№22 слайд
Содержание слайда: Concatenating Strings
When you use a string literal in Java code, it is instantiated and becomes a String reference
Concatenate strings:
String name1 = "Fred"
theirNames = name1 + " and " +
"Anne Smith";
The concatenation creates a new string, and the String reference theirNames now points to this new string.
№30 слайд
Содержание слайда: Java API Documentation
Consists of a set of webpages;
Lists all the classes in the API
Descriptions of what the class does
List of constructors, methods, and fields for the class
Highly hyperlinked to show the interconnections between classes and to facilitate lookup
Available on the Oracle website at:
http://download.oracle.com/javase/7/docs/api/index.html
№35 слайд
Содержание слайда: System.out Methods
To find details for System.out.println(), consider the following:
System is a class (in java.lang).
out is a field of System.
out is a reference type that allows calling println() on the object type it references.
To find the documentation:
Go to System class and find the type of the out field.
Go to the documentation for that field.
Review the methods available.
№39 слайд
Содержание слайда: StringBuilder Class
StringBuilder provides a mutable alternative to String.
StringBuilder:
Is a normal class. Use new to instantiate.
Has an extensive set of methods for append, insert, delete
Has many methods to return reference to current object. There is no instantiation cost.
Can be created with an initial capacity best suited to need
String is still needed because:
It may be safer to use an immutable object
A class in the API may require a string
It has many more methods not available on StringBuilder
№43 слайд
Содержание слайда: Quiz
Which of the following statements are true? (Choose all that apply.)
The dot (.) operator creates a new object instance.
The String class provides you with the ability to store a sequence of characters.
The Java API specification contains documentation for all of the classes in a Java technology product.
String objects cannot be modified.
№44 слайд
Содержание слайда: Summary
Objects are accessed via references:
Objects are instantiated versions of their class.
Objects consist of attributes and operations:
In Java, these are fields and methods.
To access the fields and methods of an object, get a reference variable to the object:
The same object may have more than one reference.
An existing object’s reference can be reassigned to a new reference variable.
The new keyword instantiates a new
object and returns a reference.
№45 слайд
Содержание слайда: Practice for Lesson 5 Overview:
In this practice, you create instances of a class and manipulate these instances in several ways. During the practice, you:
Create and initialize object instances
Manipulate object references
In this practice, you create, initialize, and manipulate StringBuilder objects
In this practice, you examine the Java API specification to become familiar with the documentation and with looking up classes and methods.
You are not expected to understand everything you see.
But as you progress through this course, you will understand more and more of the Java API documentation.
Скачать все slide презентации Lesson 5. Working with Objects одним архивом:
-
Using jquery. Creating animations, working with graphics, and accessing data
-
Object oriented programming. (Lesson 6, part 2)
-
Java 4 WEB. Lesson 10 - IO, NIO
-
Awesome outfits with gears
-
Java 4 WEB. Lesson 3 - OOP
-
RhinoScript 101 Creativity "or how to do interesting things that are not easy to do with the mouse"
-
Home Task Overview. Lesson 12
-
Work with EXCEL
-
Язык программирования Object Pascal. Общий обзор
-
The Essence of C with examples in C84, C98, C11, and C14