Hello, in this video I am going to discuss the static keyword. So the static keyword allows you to essentially create a variable in a class. So let's let me show you public static and you know the variable names on a call lists to do the scene, trying to think of something that's specific to calls that would be useful for this type. So it's the type of vehicle it is and it's a car. So if you have multiple vehicle for example, you will do some inheritance. And to add to access this, you might normally think you would do something like call OBJ and then toy and then echo it out like that.
Era accessing static property. So what this means is this value can be accessed without creating an object of the class here. And the way you do it is you put the name of the class, colon, colon, then dollar, then the actual variable name, which is type. And he prints out. So the use case for static is when you want some piece of information that's essentially linked to the car or a particular class, but you want it to be accessible without having to instantiate a version, you know, an instance of that class, aka creating an object. And you can achieve this by creating or creating a static variable.
You can have more than one static variable if you want. So this is you know, really, really cool. And yeah, that's it. If you have any questions, feel free to pop me a message actually, I think it's one use case could be is if you another use case is if you have a class that inherits from this class. And let's say it's called epic name. So that's the name of the car.
And this would be, you know, inherited. And then when you try and do not epic name, or you know, epic car like epic vehicle typing name colon colon, you can check the top of it, because you might have a bike class that can have other classes that inherit from it, and implement specific functionality for each bike. But it also specifies the type and based on that you're harmless. If it's a game, you'll show up in certain menus, be accessible, know from certain users, for example. So that's it. If you have any questions, feel free to drop me a message.
And as usual, I look forward to seeing you in the next video.