Durga Sir, one thing i will definitely comment, i have seen most of your collection videos and the way you have explained the concepts with example on such tough topics collections made me very easy to understand. The way you explained conceptually every topics is amazing. Thank you so much sir. If possible please put one video on Hashcode() and equal method () importance and differences. I have seen others video on this topic but not at all clear.
Hi Sir, HashSet will be heterogeneous only when we don't provide Generic with it. In that case ArrayList, LinkedList all can be heterogeneous if we don't use Generic. And using collection without generic in a project will lead to this warning "Type safety: The method add(Object) belongs to the raw type HashSet. References to generic type HashSet should be parameterized".
Your comment is wrong. Underlying data structure for HashSet is Hashtable not Hashmap. As it implements the Set Interface, duplicate values are not allowed. Objects that you insert in HashSet are not guaranteed to be inserted in same order. Objects are inserted based on their hash code.
I appreciate you for not using bad words. He is from south India and people there find it hard to pronounce the correct way. Some british and EU ppl use bad words to express there hatred for bad accent and ignore the effort in teaching stuff.
People in South speak English quite nicely and only few who come from smaller towns talk like this. I dont mean to offend the teacher because he is teaching well but just saying based on what I've seen. I have seen people speak English worse than this in North. Outside big cities like Delhi, North Indians speak English quite poorly with an ugly accent whereas most people in South can speak basic English.
Dharmendra Kumar View 42 videos on Collections in Java, ruclips.net/video/rI3VkItC0eA/видео.html View 5 videos on JSF, ruclips.net/video/rAa1wwWLw1Y/видео.html View 50 videos on Oracle, ruclips.net/video/pX5WJctn3Kw/видео.html View 35 videos on Hibernate, ruclips.net/video/SZ8abQ3vmdc/видео.html View 115 videos on Data Structures, ruclips.net/video/oAAiBQFSEik/видео.html View 58 videos on Struts, ruclips.net/video/nYqsnrHGsQg/видео.html View 74 videos on Spring, ruclips.net/video/YpsFT50mths/видео.html View 41 videos on CRT, ruclips.net/video/fDRnKPyvR14/видео.html View 12 videos on JAVA Reflections API & Annotations ruclips.net/video/BxCw0uTxZRs/видео.html View 39 videos on Java Real Time Project Implementation on Spring,Struts & Hibernate, ruclips.net/video/iKnb0AgKZJ0/видео.html View other videos on ADV JAVA ruclips.net/video/83jLqTAbqQU/видео.html
Hi Sir, Thanks for providing high-quality learning resources. You teach really well. I have one question like in an ArrayList after 100% capacity reached new ArrayList is created, similarly, if we create a HashSet with an initial capacity of 10 when the new HashSet will get created i.e when inserting 8th element or after inserting 7th element.
Hello Gaurav. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
awesome tutorials....underlying data structure of hashset is hashTable as sir said in video but when i google it every where i find internal implementation of hashset is hashmap. so it becomes bit confusing. which one is underlying data structire please clarify as soon as possible.
hashmap indeed. 'This class implements the Set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time. This class permits the null element.'
How does the the hash set extend there field. In the case of arraylist all the data is transferred to a newly formed big fields ,what procedure is followed in the hashset.
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.'
I want to know Sir you are saying that new HashSet is created when 75% of 1st HashSet is filled but what is the size of new HashSet?? Is there any rule/formula to calculate size of new HashSet?
yes underlying Data Structure for HashSet is HashMap but HashMap is internally implemented by using Hashtable only. Thats why in general we consider underlying data structure for both HashSet and HashMap is Hashtable.
Sir, We use Arraylist for frequent retrial because its implements RandomAcccess. then why we use hash set for frequent retrial which will not implement Random access...
Ranjith reddy View 42 videos on Collections in Java, ruclips.net/video/rI3VkItC0eA/видео.html View 5 videos on JSF, ruclips.net/video/rAa1wwWLw1Y/видео.html View 50 videos on Oracle, ruclips.net/video/pX5WJctn3Kw/видео.html View 35 videos on Hibernate, ruclips.net/video/SZ8abQ3vmdc/видео.html View 115 videos on Data Structures, ruclips.net/video/oAAiBQFSEik/видео.html View 58 videos on Struts, ruclips.net/video/nYqsnrHGsQg/видео.html View 74 videos on Spring, ruclips.net/video/YpsFT50mths/видео.html View 41 videos on CRT, ruclips.net/video/fDRnKPyvR14/видео.html View 12 videos on JAVA Reflections API & Annotations ruclips.net/video/BxCw0uTxZRs/видео.html View 39 videos on Java Real Time Project Implementation on Spring,Struts & Hibernate, ruclips.net/video/iKnb0AgKZJ0/видео.html
what is the size ratio with which the object will be recreated after the max capacity is reached? like for arraylist , the new size of arraylist is 3/2*originalSize +1
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.' REPLY
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.' REPLY
Hello Sir..could you tell us how to find capacity of HashSet(Not size of HashSet) ...Also after0.75% fill ratio of how much capacity new HasSet gets created?
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.' REPLY
Thank you sir.. and can you possible to upload java.util.concurrent package? Some people asked in interview room.. I want more knowledge on concurrent package sir..
Durga Software Solutions Hi, We are very Happy to say Our Expert Faculty Durga Sir's One-to-One Video Sessions on "Core Java with SCJP/OCJP" are available. Shooted from direct Class Room. YOu can access these videos from anywhere anytime. Around 200+ hours training, 178 Videos with clear explanation on every concept. 100% Satisfaction and Perfection in Subject guaranteed. For Demo Sessions Please call or drop a mail to us... DURGASOFT Online Training ph: 91-8885252627 mail :durgasoftonline@gmail.com, durgasoftonlinetraining@gmail.com Demo Sessions on youtube: 1. Language Fundamentals(16 Videos)ruclips.net/video/eTXd89t8ngI/видео.html 2. Operators & Assignments(7 Videos)ruclips.net/video/1JGOPhIyhAM/видео.html 3. Flow Control(6 Videos)ruclips.net/video/X6rS9vD9-qM/видео.html durgasoft.com durgasoftonlinetraining.com facebook.com/durgasoftware durgajobs.com facebook.com/durgajobsinfo
how to treat with equal and hashcode methods in hashset when the duplicate occur in hashset program like this example .. package collectionns; import java.util.HashSet; public class hashseterror { String language; int year; public hashseterror(String adress, int age) { this.language = adress; this.year = age; } public String toString() { return language + " " + year; } public static void main(String[] args) { HashSet hash = new HashSet(); hash.add(new hashseterror("java", 2015)); hash.add(new hashseterror("java", 2015)); System.out.println(hash); } } please explain video to treat with this error
Kenneth John View 42 videos on Collections in Java, ruclips.net/video/rI3VkItC0eA/видео.html View 5 videos on JSF, ruclips.net/video/rAa1wwWLw1Y/видео.html View 50 videos on Oracle, ruclips.net/video/pX5WJctn3Kw/видео.html View 35 videos on Hibernate, ruclips.net/video/SZ8abQ3vmdc/видео.html View 115 videos on Data Structures, ruclips.net/video/oAAiBQFSEik/видео.html View 58 videos on Struts, ruclips.net/video/nYqsnrHGsQg/видео.html View 74 videos on Spring, ruclips.net/video/YpsFT50mths/видео.html View 41 videos on CRT, ruclips.net/video/fDRnKPyvR14/видео.html View 12 videos on JAVA Reflections API & Annotations ruclips.net/video/BxCw0uTxZRs/видео.html View 39 videos on Java Real Time Project Implementation on Spring,Struts & Hibernate, ruclips.net/video/iKnb0AgKZJ0/видео.html View other videos on ADV JAVA ruclips.net/video/83jLqTAbqQU/видео.html
This guy never disappoints.
Thank you 😊 so much Durga sir for uploading vedios. 🙏
Durga Sir, one thing i will definitely comment, i have seen most of your collection videos and the way you have explained the concepts with example on such tough topics collections made me very easy to understand. The way you explained conceptually every topics is amazing. Thank you so much sir. If possible please put one video on Hashcode() and equal method () importance and differences. I have seen others video on this topic but not at all clear.
Hi Sir, HashSet will be heterogeneous only when we don't provide Generic with it. In that case ArrayList, LinkedList all can be heterogeneous if we don't use Generic. And using collection without generic in a project will lead to this warning "Type safety: The method add(Object) belongs to the raw type HashSet. References to generic type HashSet should be parameterized".
Sir thank you so much I am new to java ur explanations are very easy to understand. Even I saw lot of concepts but not understandable
JAVA King DurgaSir
🙏😢Awesome sir ...
You make it easy..
❤no word to say ...
Way of Explanation is Wonderfull !
Best teaching style............. Thanks Alote.....................
Just a suggestion. Subtitle will help a lot.
thanks sir for giving valuable classes @ free...
hello sir, your classes are excellent but if u upload the remaining map and queue videos also it will be very beneficial for us
Mr. Java
Concept explanation is awesome. Thanks.
:)
Than k you Durga sir
Awesome Explanation ... Thanks a lot .... please let us know if you have anything in C# side or C++
You are doing good sir, Please correct for people, who are following you. Underlining data structure is HashMap not Hashtable.
Your comment is wrong. Underlying data structure for HashSet is Hashtable not Hashmap. As it implements the Set Interface, duplicate values are not allowed. Objects that you insert in HashSet are not guaranteed to be inserted in same order. Objects are inserted based on their hash code.
Very good explanation
in the example of hashset , i have to use javac -xlint
The accent was too strong, so had to pay very close attention on the english part, but the explanation was very good! Thanks.
I appreciate you for not using bad words. He is from south India and people there find it hard to pronounce the correct way. Some british and EU ppl use bad words to express there hatred for bad accent and ignore the effort in teaching stuff.
tHe_VaGaBonD ....yes man...even I m happy...he has explained very nicely...
People in South speak English quite nicely and only few who come from smaller towns talk like this. I dont mean to offend the teacher because he is teaching well but just saying based on what I've seen. I have seen people speak English worse than this in North. Outside big cities like Delhi, North Indians speak English quite poorly with an ugly accent whereas most people in South can speak basic English.
English is his third language. so ups and downs are natural. teaching on the other hand is the best
At best he is not adding fake accent. He is natural with a immense knowledge.
FOR QUICK OVERVIEW:(these are timestamps)
2:57
7: 46
14:27
17:25
superb video sir....
Dharmendra Kumar
View 42 videos on Collections in Java,
ruclips.net/video/rI3VkItC0eA/видео.html
View 5 videos on JSF,
ruclips.net/video/rAa1wwWLw1Y/видео.html
View 50 videos on Oracle,
ruclips.net/video/pX5WJctn3Kw/видео.html
View 35 videos on Hibernate,
ruclips.net/video/SZ8abQ3vmdc/видео.html
View 115 videos on Data Structures,
ruclips.net/video/oAAiBQFSEik/видео.html
View 58 videos on Struts,
ruclips.net/video/nYqsnrHGsQg/видео.html
View 74 videos on Spring,
ruclips.net/video/YpsFT50mths/видео.html
View 41 videos on CRT,
ruclips.net/video/fDRnKPyvR14/видео.html
View 12 videos on JAVA Reflections API & Annotations
ruclips.net/video/BxCw0uTxZRs/видео.html
View 39 videos on Java Real Time Project Implementation on Spring,Struts & Hibernate,
ruclips.net/video/iKnb0AgKZJ0/видео.html
View other videos on ADV JAVA
ruclips.net/video/83jLqTAbqQU/видео.html
Durga Software Solutions
View 9 videos on ENUM,
ruclips.net/video/T1fMWwI9D1E/видео.html
View 16 videos on Serialization,
ruclips.net/video/bIzfrvdt7qM/видео.html
very nice sir..
Hi Sir,
Thanks for providing high-quality learning resources. You teach really well.
I have one question like in an ArrayList after 100% capacity reached new ArrayList is created, similarly, if we create a HashSet with an initial capacity of 10 when the new HashSet will get created i.e when inserting 8th element or after inserting 7th element.
Hello Gaurav.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
I think after trying to insert 8th element
sir u r great
awesome tutorials....underlying data structure of hashset is hashTable as sir said in video but when i google it every where i find internal implementation of hashset is hashmap. so it becomes bit confusing. which one is underlying data structire please clarify as soon as possible.
hashmap indeed. 'This class implements the Set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time. This class permits the null element.'
What is the meaning of underlying datastructure for HashSet is hashtable?
How does the the hash set extend there field. In the case of arraylist all the data is transferred to a newly formed big fields ,what procedure is followed in the hashset.
Hello Nibin.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627,7207212427/28
'null' insertion is not allowed in Hashtable but it is allowed in HashMap.
Better run example using Eclipse and show the hash details
Load factor is about when will be new HashSet will be created?
but
what will be the new capacity?
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.'
I want to know Sir you are saying that new HashSet is created when 75% of 1st HashSet is filled but what is the size of new HashSet?? Is there any rule/formula to calculate size of new HashSet?
Hello Prajyot.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
It gets doubled each time whenever it is completely loaded...I.e., 16,32,64.....
This is his native prononce .new capacity is 16 while debug time u can find out
Good video
sir it is not giving false. If values are same so .Only it is ignoring that.
Please have a tutorial for concurrent hashmap
Which method is used to find the default capacity in hashset?
Hello Raja Sekhar.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
plz add remaining videos of collections also...
Hi Sir,can you please tell me how hashset internally work in java that video please
Sir underlying data structure for HashSet is HashMap .
Please correct me if I am wrong
Because Hashtable doesn't allow null value.
yes underlying Data Structure for HashSet is HashMap but HashMap is internally implemented by using Hashtable only.
Thats why in general we consider underlying data structure for both HashSet and HashMap is Hashtable.
Thank u sir
Durga Software Solutions thanks a lot...even I was thinking d same...how come Durga sir can do mistake...
How to find first and last element in hashset sir. Is there any predefined method.
I think if we can iterate over iterator, so maybe no, because iterator has only next method
Sir, We use Arraylist for frequent retrial because its implements RandomAcccess. then why we use hash set for frequent retrial which will not implement Random access...
Ranjith reddy
View 42 videos on Collections in Java,
ruclips.net/video/rI3VkItC0eA/видео.html
View 5 videos on JSF,
ruclips.net/video/rAa1wwWLw1Y/видео.html
View 50 videos on Oracle,
ruclips.net/video/pX5WJctn3Kw/видео.html
View 35 videos on Hibernate,
ruclips.net/video/SZ8abQ3vmdc/видео.html
View 115 videos on Data Structures,
ruclips.net/video/oAAiBQFSEik/видео.html
View 58 videos on Struts,
ruclips.net/video/nYqsnrHGsQg/видео.html
View 74 videos on Spring,
ruclips.net/video/YpsFT50mths/видео.html
View 41 videos on CRT,
ruclips.net/video/fDRnKPyvR14/видео.html
View 12 videos on JAVA Reflections API & Annotations
ruclips.net/video/BxCw0uTxZRs/видео.html
View 39 videos on Java Real Time Project Implementation on Spring,Struts & Hibernate,
ruclips.net/video/iKnb0AgKZJ0/видео.html
Durga Software Solutions
View 9 videos on ENUM,
ruclips.net/video/T1fMWwI9D1E/видео.html
View 16 videos on Serialization,
ruclips.net/video/bIzfrvdt7qM/видео.html
following
what is the size ratio with which the object will be recreated after the max capacity is reached? like for arraylist , the new size of arraylist is 3/2*originalSize +1
The size will double . ruclips.net/video/fSjxhOYPBRI/видео.html
sir please upload Hashtable video
What about new Capacity formula
Hello Friend.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
What is meant by underline data structure and hash code????
this video is good bcz less timing video
I am using default load factor 0.75, and it reaches now new Hashset will be created , What is size of new Hashset ?
Any formula is there to found ?
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.'
REPLY
whats the new capacity of new hashset that you not specify
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.'
REPLY
sir please guide me on hashtable or upload video for hashtable..
*****
Demo Sessions on youtube,
Language Fundamentals(16 Videos)ruclips.net/video/eTXd89t8ngI/видео.html,
Operators & Assignments(7 Videos)ruclips.net/video/1JGOPhIyhAM/видео.html,
Flow Control(6 Videos)ruclips.net/video/X6rS9vD9-qM/видео.html.
Hello sir, is ppt available for whole collection Framework playlist ?
Hello Sandhya.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
please upload java applet videos
Hello Sir..could you tell us how to find capacity of HashSet(Not size of HashSet) ...Also after0.75% fill ratio of how much capacity new HasSet gets created?
go to paid tutorial!!!
'The initial capacity of HashSet is 16. When the load factor (0.75) is reached, i.e. 16 * 0.75 = 12; on the insertion of the 12th element the capacity is doubled, i.e. it becomes 32.'
REPLY
Thank you sir.. and can you possible to upload java.util.concurrent package? Some people asked in interview room.. I want more knowledge on concurrent package sir..
Chiguru Praveenkumar
View other videos on Collections in Java
and click the below link
ruclips.net/video/rI3VkItC0eA/видео.html
Durga Software Solutions
View 9 videos on ENUM,
ruclips.net/video/T1fMWwI9D1E/видео.html
View 16 videos on Serialization,
ruclips.net/video/bIzfrvdt7qM/видео.html
Durga Software Solutions
Hi,
We are very Happy to say Our Expert Faculty Durga Sir's One-to-One Video Sessions on "Core Java with SCJP/OCJP"
are available. Shooted from direct Class Room. YOu can access these videos from anywhere anytime. Around 200+ hours
training, 178 Videos with clear explanation on every concept. 100% Satisfaction and Perfection in Subject guaranteed.
For Demo Sessions Please call or drop a mail to us...
DURGASOFT Online Training
ph: 91-8885252627
mail :durgasoftonline@gmail.com, durgasoftonlinetraining@gmail.com
Demo Sessions on youtube:
1. Language Fundamentals(16 Videos)ruclips.net/video/eTXd89t8ngI/видео.html
2. Operators & Assignments(7 Videos)ruclips.net/video/1JGOPhIyhAM/видео.html
3. Flow Control(6 Videos)ruclips.net/video/X6rS9vD9-qM/видео.html
durgasoft.com
durgasoftonlinetraining.com
facebook.com/durgasoftware
durgajobs.com
facebook.com/durgajobsinfo
sir,
if load factor is 0.75 and initial capacity is 16.
After inserting 12 elements what will be the new Capacity?
i mean how it grows further?
it get doubles that means 16-32,32-64..........
but you never talked about how or why it is best for search operation ?
I was expecting something about it....
Because hashing techniques have O(1) time complexity for their search operation.
What is hashCode?
Its a numerical number to identify an instance/object, you can acquire it by calling Object.GetHashCode() method (C#).
how to treat with equal and hashcode methods
in hashset when the duplicate occur in hashset program
like this example ..
package collectionns;
import java.util.HashSet;
public class hashseterror {
String language;
int year;
public hashseterror(String adress, int age) {
this.language = adress;
this.year = age;
}
public String toString() {
return language + " " + year;
}
public static void main(String[] args) {
HashSet hash = new HashSet();
hash.add(new hashseterror("java", 2015));
hash.add(new hashseterror("java", 2015));
System.out.println(hash);
}
}
please explain video to treat with this error
nice tutorial :)
Kenneth John
View 42 videos on Collections in Java,
ruclips.net/video/rI3VkItC0eA/видео.html
View 5 videos on JSF,
ruclips.net/video/rAa1wwWLw1Y/видео.html
View 50 videos on Oracle,
ruclips.net/video/pX5WJctn3Kw/видео.html
View 35 videos on Hibernate,
ruclips.net/video/SZ8abQ3vmdc/видео.html
View 115 videos on Data Structures,
ruclips.net/video/oAAiBQFSEik/видео.html
View 58 videos on Struts,
ruclips.net/video/nYqsnrHGsQg/видео.html
View 74 videos on Spring,
ruclips.net/video/YpsFT50mths/видео.html
View 41 videos on CRT,
ruclips.net/video/fDRnKPyvR14/видео.html
View 12 videos on JAVA Reflections API & Annotations
ruclips.net/video/BxCw0uTxZRs/видео.html
View 39 videos on Java Real Time Project Implementation on Spring,Struts & Hibernate,
ruclips.net/video/iKnb0AgKZJ0/видео.html
View other videos on ADV JAVA
ruclips.net/video/83jLqTAbqQU/видео.html
Durga Software Solutions
View 9 videos on ENUM,
ruclips.net/video/T1fMWwI9D1E/видео.html
View 16 videos on Serialization,
ruclips.net/video/bIzfrvdt7qM/видео.html
Naaaaat allowwweddd....mmmmm
Very nicely explained