6.2 OOP class

Hello in the previous video we saw the concept of classes in this video we will start by talking about ... object-oriented programming and more particularly the classes we saw in the videos they are the components ... fundamental of programming object oriented in Java and also in other language like php or C and again ... others first we need to understand what objects are they are really key to understand the technology ... object oriented in what I would like you to do is just throw away a glance in the room or in ... the area where you are currently here you do that you will see that there are a lot of real world objects for example I sit myself ... personally I sit I can have a computer I can see a keyboard I can see ... a mouse, a microphone of other objects All these are objects of the real world if you look around you or you are, you ... can see other objects like a pen for example, it is object a pencil of light, but also other objects ... real-world objects have two major characteristics, that is, the state and the behavior so the state in terms of computers can ... be the RAM quality that owns the operating system that it uses the size of the hard drive the size ... of the screen that kind of thing. Object-oriented programming, they are very similar to real-world objects, they have states and behaviors we ... let’s start by creating a own class and then we’ll see the states of the class and ... the behavior of the class perform, I hope you understand the concept of an object so we prove ourselves ... will start by creating our city class that we started doing in the previous class Let’s start by creating our city class no class that, it is a right click on SRC new and Java class the ... name of our class City forgot not to respect the naming rules it means that V must be ... capital City the public keyword means unrestricted access to the class you will use public pretty much in —all the classes you’re going to create but there are also access modifiers that we can use a ... a little further than private that we’re going to see in the different courses we’re going to do but in general it’s allowing us to be able to limit access to our class means that you are a class can ... not yield to our class if we use the private keyword but if we use the public keyword ... it means that all the classes we have shouted can have access to our place here our class ... City if I had another class it can have access to this class state given that we used the ... public keyword you can also completely delete the public access modifier if you prefer but we will talk a little more in ... detail than this modifier access in the next videos and deleting our class will work properly for now in general ... just use the word-public key knowing that this means that the other classes we have created have access ... to this class in the next course we will delve into the different aspects regarding class