In this post we will see different ways we can iterate through a map , HashMap and TreeMAp in Java.
Continue readingTag: hashset example
How to create HashMap In Java
In previous post we have learn java about hashmap methods in java and java hashmap example . Now In this article
Continue readingHow to check HashSet Empty Or not
To check Set/HashSet is empty or not we use isEmpty() method . HashSet isEmpty() method returns true if this set
Continue readingHow to count number of element in HashSet
In order to count number of element in Set/HashSet , use size() method. Set.size() method returns the number of elements
Continue readingHow to find does HashSet contains elements or not
In this post we will see how to check any element is or not in set. We can check given
Continue readingHow To Convert Hashset To Array
In Previous post we have learn how to convert Array to HashSet . In this post we will see how
Continue readingHow to Remove Set From HashSet
We can remove set from Hashset with the help removeAll() method. Hashset removeAll() method in java removes from this set
Continue readingHow to remove all element from HashSet
We can remove all element from HashSet using clear() method . Clear () method of set removes all of the
Continue readingHow To Remove Element of Hashset
In this tutorial we will see how to remove element from set java . We can remove element from Hashset
Continue readingHow to copy Set content to another HashSet?
In this tutorial we will see how to copy element of one set to hashset. addAll() method can copy any
Continue reading