You can learn Java with me as the Java Programming language is being made easily. It would take a period of minimum three months and maximum 6 months to master Java. I would recommend you to watch all my videos to crack any software interviews that would require Java Programming language as a primary skill.
Set interface:-
===============
1.It is one of the interfaces in the Collection Framework
2. It is child interface to Collection interface
3. It has some properties and behaviours
4. It is not maintaining the insertion order.
Note:- LinkedHashSet which is the implementation class of the Set interface maintains Insertion order.
5. It internally uses Hashcode values to store data.
6. It is not following sorting order also.
Note:-SortedSet,NavigableSet and TreeSet they follow sorting order.
7. It allows heterogeneous elements for non-generic type and homogeneous elements for generic type
Note:-SortedSet,NavigableSet and TreeSet they always allow Homogeneous elements
8. It will allow only one null value.
Note:-SortedSet,NavigableSet and TreeSet they will not allow null value at all.
9.You can avoid duplicates and all the duplicate objects will be removed or taken care.
HashSet:-
========
1. It was introduced in JDK1.2.
2. It is a non-legacy class.
3. It is a child class to Set interface.
4. It is not maintaining the insertion order.
5. Its default capacity is 16.
6. It internally uses Hashing Technique to store elements.
7. It allows only one null value.
8. It will not allow you to add duplicated elements
9. Its load factor is 0.75% or its fill ratio is 0.75 %
10. It is non-synchronized in nature
11. It is high in performance.
12. It is not a thread safe.
13. It cant be used in Multithreaded environment.
14. Data consistency is not maintained.
15. It is used for frequent search operations.
Constuctors:-
===========
1. public HashSet();//16
2. public HashSet(int capacity);//own size
3. public HashSet(int capacity,float loadFactor);