

More courses! Free C++ course:
Make a social network with Spring Boot:
Learn about MySQL and relational databases:
Java desktop programming:
Intermediate-Advanced C++ 11:
——————————————————————————————————————————————-
How to use sets in Java — HashSet, TreeSet and LinkedHashSet. In this tutorial I also explain how to find the intersection of two sets and the difference of two sets, as well as the usual stuff – iteration, adding and removing items and so on.
——————————————————————————————————————————————–
More videos on my YouTube channel:
source
Really, the accent does matter. I subscribe because of your pronunciation.
This damn video amounts to nearly 60% of my exam 😀
Thank you.
and I learned what an Aardvark is, which is always a bonus.
Thanks for the tutorial.
The third of the operations, besides intersection, which is symmetrical, set difference, which you showed here, is of course Union. I can immediately think of a couple of ways that we could do it, but you could mention which is the "best" or recommended way of obtaining the union of two sets or "adding" one to the other.
This is great!!
.
old fuck lol
Mister John, thank you very much!
thank you, on 15 minutes you did what my professor couldn't do, that was explain this subject, IN AN HOUR
thank you very much, feel much more confident for the test now
this guy is legend.Looking for some videos about building real world projects.(make them paid :)) )
You are the best teacher ever! Even in college my professors could not explain as well as you. Thank you lots John 😀
you should ave kept the piano music all video long
That was actually Awesome
Awesome tutorial. Thank you!
Thank you! I just realised what a stupid way I used writing my program which compared two text files and then said what the differences between them are. I could use the Set collections instead of ArrayList to avoid a big code with a lot of loops which check what matchs and what doesn't!
How would you apply this to your own class? I have a employee class that is implementing comparable, but when I try to add(new Employee("Name", 12323, 12, 12, 192), it only add one to the treeset.
I do this: mystreeset.add(new Employee("name", salary, hireday); many times, but when I print it only the first one get printed out, and the size is also only one. Any idea?
What da fuck
This was great thank you. Really helped me understand the concept of sets! You're saving me on this late assignment!
Thanks for Tutorials))
what's with the music and that voice (it's really irritating).Please try to talk like you are having a casual conversation.
Yes I also think that it's johny Ives!!
thanks , your videos are perfekt, you help me very ))) for all this I needed longe time, and I see now it is very simple , i wish you good luck
Great job. Thanks to this tutorial, I now know much more about Java Sets and aardvark – a medium-sized, burrowing, nocturnal mammal native to Africa; only living species of the order Tubulidentata.
I used hash set and it retained order.
If your code is dependent on properties not defined in the interface but only the implementation, you shouldn't abstract away that information by referring to an
implementation instance by its interface.
Hello John, I really like you videos !! Thanks for fantastic work 🙂
you are the best great work thk
Thank you very much! Awesome tutorial. The opera music and the very soothing voice makes me picture you like a sloth. A very classy sloth with a monocle and a gentleman hat.
you are the best, :).
Hi John, i just so total looooooovvveeeeee your tutorials. You are awesome! Thank you so very much for teaching/sharing your knowledge!!! 😀
The order i got – it worked nicely
HashSet: 9 [Cactus, Lilly, Lemon, Apple, Pineapple, Rose, Jute, Banana, Jasmine]
LinkedHashSet: 9 [Apple, Banana, Lemon, Cactus, Jute, Rose, Jasmine, Lilly, Pineapple]
TreeSet: 9 [Apple, Banana, Cactus, Jasmine, Jute, Lemon, Lilly, Pineapple, Rose]
I know you can iterate over the set with Iterator. When I should use Iterator over foreach loop and vise verse
Excellent video. Thank you very much
The damn opera music and "sophisticated" voice makes me wanna go to sleep.
Really nice, crisp and to the point..thank you very much.
dude thanks! helped me out a lot. Exame in two days 😀
you can use the diamond operator with newer version of java
Cool presentation 😀
addAll()
Awesome :-). How can we do union of two sets in best efficient way ?
that's pretty much everything I needed to know about sets all in 15 concise minutes. Thanks for uploading!
Great………………………
I use syso ;P
but I can pronounce it, can You?
Thank you!! Such a big help 😀
Most excellent tutorials. I am speechless.
Type sysout and press ctrl+space. Or in Netbeans type sout.