RUVIDEO
Поделитесь видео 🙏

Introduction to Classes And Objects in Java + Examples || Tutorials #34

objects and classes:
An object is a software component that exists in memory and serves a specific purpose in a program. An object is created from a class that contains code describing the object.
If you have ever driven a car, you know that a car consists of a lot of components. It has a steering wheel, an accelerator pedal, a brake pedal, a gear shifter, a speedometer, and numerous other devices that the driver interacts with. There are also a lot of components under the hood, such as the engine, the battery, the radiator, and so forth. So, a car is not just one single object, but rather a collection of objects that work together.
This same notion applies to computer programming as well. Most programming languages in use today are object-oriented. With an object-oriented language, such as Java, you create programs that are made of objects. In programming, however, an object isn’t a physical device, like a steering wheel or a brake pedal; it’s a software component that exists in the computer’s memory and performs a specific task. In software, an object has two general capabilities:
• An object can store data. The data stored in an object are commonly called fields.
• An object can perform operations. The operations that an object can perform are called methods.
When a program needs the services of a particular type of object, it creates that object in memory and then calls that object’s methods as necessary.

A class is a code that describes a particular type of object. It specifies the data that an object can hold (the object’s fields), and the actions that an object can perform (the object’s methods). You can think of a class as a code “blueprint” that can be used to create a particular type of object. It serves a purpose similar to that of the blueprint for a house. The blueprint itself is not a house, but rather a detailed description of a house. When we use the blueprint to build an actual house, we could say we are building an instance of the house described by the blueprint. If we so desire, we can build several identical houses from the same blueprint. Each house is a separate instance of the house described by the blueprint.
So, a class is not an object, but a description of an object. When a program is running, it can use the class to create, in memory, as many objects of a specific type as needed. Each object that is created from a class is called an instance of the class.

When you are working with an object, you are typically using two things:
• The object itself, which must be created in memory
• A reference variable that refers to the object
The object that is created in memory holds data of some sort and performs operations of some sort. (Exactly what the data and operations depend on what kind of object it is.) In order to work with the object in code, you need some way to refer to the object. That’s where the reference variable comes in. The reference variable doesn’t hold an actual piece of data that your program will work with. Instead, it holds the object’s memory address. We say that the variable references the object. When you want to work with the object, you use the variable that references it.
Reference variables, also known as class type variables, can be used only to reference objects.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Introduction to Classes And Objects in Java + Examples || Tutorials #34», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.