HashMap overview

Its basically designed to store key value pairs HashMap class implements the Map interface and it is built using hashtable Main features of HashMap It stores data in the form of key-value pair Keys in the HashMap must be unique It allows one Null key and multiple Null values It does not maintain the order […]

Share this article on

Size of TreeSet

Its very important to know the size of TreeSet as it is required in most of the times while coding We have size() method in TreeSet class which helps us to determine the size of TreeSet Size is the number of elements in that TreeSet public int size() Example : import java.util.*;   public class […]

Share this article on
< Previous Next >