Basic values like strings can be compared using the double equality sign. The result is true if these are the same values or false if there is a difference between them. But what happens if I compare two instances of a custom class? Here I have a regular class called dog in a few instances. Here I have dog1 named cookie, who is one, and I also have dog3 also called cookie and is also age one. These are identical and have the same name and age, but if you compare these two objects, they will not be considered the same. These are two separate objects and all objects are by default unique, which means that every instance of a regular class is considered as unique. You will only have true from two objects comparison if you have two references to the same object, like in here. In both sides, you can see dog1. Every object by default is unique. You can also print values. If you print string A, A displays, if you print number 42, 42 displays. But what happens if you print an instance of a class or if you transform an instance of a class into a string? The answer is that by default, a class generates a string that is its name. Then there is at, and some numbers and characters that identify this object. The purpose of those letters and characters is to help you recognize if two values are identical or not. Here I print dog1 twice. I have dog with the same number and here I print other dogs. As a result, I have dogs with different numbers. The equality and transformation to a string gives little information and ignores all the properties. It is fine for objects that should be considered unique. But there are also other cases. These are the cases where I want a class to represent the data it holds. If I think of this dog class as a holder of data, a holder of name and age then the two dog should be considered equal if they have the same name and age. These objects should display information about its properties if I asked to transfer the dog into a string. For these situations, there is a dedicated modifier called data modifier. If I add this modifier before a class, then the behavior of the equality operator and transformation of the string changes significantly. Here, two identical objects were considered equal and they are still equal. Over here two different objects that were considered not equal are still not equal. Dog1 and dog3 who are both called Cookie and have the same age were not considered equal, but they are equal now. This means that the behavior of equality has changed. When I use the data modifier, the two objects are now the same if they are the same class and have the same data. Because I have dogs with the same names and age, they are considered the same when I use the data modifier. The transformation to the string has also changed. At first, it was just the dog and some number and characters. But now the dog properties together with their values display. It starts with the dog class name bracket, and with each primary constructor property, there's the name of the property, equality sign, and its current value. This is extremely useful as I can see what is in the classes. This is not all that changes when I introduced the data modifier. The other feature that it introduced is called destructuring. When you have a dog, but you are interested in reading its name and age, the classic way to get them is by separating using the name and age properties. Thanks to the data modifier, I can now just state that I'm interested in reading the name and age of the dog. The first variable is name and the second variable states the age. Restructuring is based on the position of elements and it doesn't matter how those variables are named. The first variable is associated with the first property from the primary constructor, and the second variable is associated with the second property. It does not matter what name I give it. It can be called first name, and it still works. It is useful as I can give different names to variables, but you also need to be careful. If you by accident give incorrect positions to your variable names, Kotlin gives a warning, but it still compiles. Under the variable name, the age of the dog displays, and under the variable age, the name of the dog displays. This is incorrect. The position of the variable is important and not its name. Another feature that the data modifier introduced is called a copy function. It is useful for classes like this one that have only vowel properties. I want to produce a slightly modified variant of the objects. Let's say, for example, that your dog got older and you want to create a new instance of the dog class using the same data, but just changing the age of the dog. You will not be able to modify the object inside because all of its properties are vowel. However, you can make a new dog object that is a slightly modified version of the current one. To create a modified version of a data object, I use the copy method that is generated by the data modifier. When I use the copy method, I can specify what I want to change, and I can, for instance, specify that I want the dog's age to be changed to two or change to the previous age, to the current age plus 1. I will now have a dog with a new age, which is two The copy method creates a new object and does not modify the current one. If this were a dog2, the previous dog would still have the same age. This is a particularly useful function, especially if you are using large systems where they prefer using vow instead of var properties. You should now be familiar with data classes in Kotlin and how they work.