Hello in this Java programming video, we are going to take a look at the hash table data structure. So the hash table data structure is pretty much similar to the data structures in that it has a key value pair sort of scenario. And let me show you how to implement it. So you're gonna want to import Java dot util dot Asterix lines. And now you're going to put a hash table. Hash, a T equals new table.
I realize the constructor name wrong catholicity. And now, to add something to the screen t.pr and the key, I'm going to put you on the value I'm going to put one foot in word for number two. Okay, so first of all, what we're going to do is create an enumeration and this is what we'll use to be able to loop over it. And actually before that, let's see I printed out some more even after putting in a lot for 14 there There you go, you know it prints them out. So but it is in reverse order. So just, you know, bear that in mind.
So it is you know, so luck lastin first out situation. And we could also do like T dot Forget the object at a particular index as an extra task only to you know, experiment with that yourself. But yeah, let's continue our world numeration inequality equals T key like so. And loop over, while a, da has more elements, so on still more elements to you know, go through and we can print it out so we can do what we want to do is I'm going to call this equals to string so usually when we get the value for next element, like so, and now system dot print ln and we are going to print out See? The final one is this going to be um, actually I'll show you the dot get method we'll get the key we use in key. We get a unique key, everything will time run it.
There we go. So it's printed the app. And that's it for hash tables. That's a use it. If you have any questions, feel free to reach out. I will provide a link with this video that will show you more functionality of hash tables.
So have a look at that. And I look forward to seeing you in the next awesome Java video.