Hello, in this Java programming video, we are going to take a look at enums or you know enumerations. And they offer the code. So any num is extremely simple to weigh that is a data structure with a data type that allows you to group a bunch of sort of keywords about, you know, our own custom keywords. And they're assigned a integer value, he would default or we can assign one ourselves. So if you have a look, you can if you want to implement it sort of outside your need to be in its own class. We'll just go inside here.
So the public email, then the name your email, so I'm going to put let me put animals and now in here you put your animal food dog Lion I'll be fine. It is system dot print ln, we can print out one of the values they do animal dot dog as one and see what we get. So we get done so it's literally just printed out dogs. So you know behind the scenes, you'll have some sort of value assigned to it in many other languages, but what we want to what you can do with this is it's great for if statements or when you're referring to something. So instead of, you know if you have an if statement, and the user can input something, and based on the input your message to the dog, cat cow like character, for example, it is some sort of video game said that if I pause You would create animals.
Animals for quality A. So you could just do a dog. Okay when you assign something to it bless myself, Animal, dog. There we go. So this will know your own system intelligence. I'll put true to cat.
Nothing should actually print out because cat does not equal dog in the enumerated animal data. So I think there's much more to it than that. If you want to go a step further you can Sort of, you know, add method potentially, in the, you know, as well, you can assign integer values, that's a little bit extra and we're lucky leave that for you to try and figure out yourself any help, feel free to reach out very similar to what we've done in the previous videos. Thanks for watching, and I look forward to seeing you in the next awesome Java tutorial.