Java Tutorial For Beginners 35 – HashSet in Java

///Java Tutorial For Beginners 35 – HashSet in Java

Java Tutorial For Beginners 35 – HashSet in Java

FavoriteLoadingAdd to favorites

Find code here –


Java – The HashSet Class
Java Collections Framework Tutorial
Set and HashSet : HashSet
Java Collections – Set
Searches related to java tutorial hashset
java hashset element
java collections tutorial
java iterate hashset
hashset java collections
hashset remove
hashset example in java
java set hashset
java print hashset
HashSet examples

By |2017-06-29T03:17:33+00:00June 29th, 2017|Java Video Tutorials|17 Comments


  1. Hanad Botan June 29, 2017 at 3:20 am - Reply

    I really love your video content and it has helped a lot in my first year of university. Thank you.

  2. Sanjay Gupta June 29, 2017 at 3:21 am - Reply

    ur video are too good and helped in my learning core java.

  3. DB Carey June 29, 2017 at 3:27 am - Reply

    Thank you! Good explanation for a beginner such as myself.

  4. Mirza Baig June 29, 2017 at 3:27 am - Reply

    Dear +ProgrammingKnowledge I don’t know your name. Thank you as these videos helped me a lot. I pray for your good health and happiness forever.

  5. Eshan Singhai June 29, 2017 at 3:30 am - Reply

    bro what is import java.util.*

  6. Arun Prakash June 29, 2017 at 3:30 am - Reply

    what is the difference between Hashset and List Iterator? both operates the same

  7. Plamen Ivanov June 29, 2017 at 3:37 am - Reply

    HashShet 😀

  8. Sudipto Chatterjee June 29, 2017 at 3:47 am - Reply

    The HashSet is an implementation of a stack with unique objects. Hence when you use the Iterator to read through the example provided in the video, it shall print in the order of Last In First Out.

    When you use the add method and put in a duplicate value, there shall be no compile time or run time error, and neither shall it give errors while trying to access. The add method returns false, if the object is a duplicate.

    To remove from the hashset you shall need use name.remove("jack") !

  9. Wajahat Ahmed June 29, 2017 at 3:54 am - Reply

    How to print specific index value from hashset?

  10. ektelestis47 June 29, 2017 at 3:59 am - Reply

    It doesn’ t print the names from top to bottom like the ListIterator… actually it prints:

  11. Atheer MMC June 29, 2017 at 4:05 am - Reply

    I think UR video must show 2 us the result as follow : when I entered twice time every number in hash list and in link list what’s happen?……..
    for (i=0;i<=1;i++)
    for (j=0;j<=5;j++)
    for (i=0;i<=1;i++)
    for (j=0;j<=5;j++)
    ——————————————————————— the result is:
    The HashSet output is:
    0 1 2 3 4 5
    The LinkedList output is:
    0 1 2 3 4 5 0 1 2 3 4 5

  12. Prem Prakash June 29, 2017 at 4:07 am - Reply

    Great job done…it helped me a lot. tysm

  13. Total Syambles June 29, 2017 at 4:13 am - Reply

    Please Help! When I type in: HashSet<String> name = new HashSet<String>(); it says "HashSet is not generic, it cannot be parameterised with arguments such as <String>"

  14. Ammbadisz June 29, 2017 at 4:15 am - Reply

    Thank you very much sir GOD bless you!

  15. Atheer MMC June 29, 2017 at 4:15 am - Reply

    thanx >>>
    but i dont know how hash vs. list

  16. Nadim Baraky June 29, 2017 at 4:16 am - Reply

    in a hash set values are not sorted in the order of insertion

  17. Ermal Aliu June 29, 2017 at 4:17 am - Reply

    You typed these lines of code:


    Why the ranking of the values in the output is like this:

Leave A Comment