Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
in general the set is an unordered collection with no duplicates, java's sets have been optimized so that it is very fast to search in them and there is two types of set: 1.HASH SET 2.tree set and the only difference that tree set give us the alphabetical order for the list you enter to it in the output. and the hash set give us random order in the output. but HASH MAP give you the key and value (dictionary in python) example: map<string,double> salary=new hashMap <string,double>(); salary.put("john",2500.00); ... etc.
26th Sep 2017, 11:03 PM
Mima_nf
Mima_nf - avatar