Press "Enter" to skip to content

DevCubicle

HashMap entrySet() Method in Java

The entrySet() method of HashMap returns the set view of the entries in this map. Syntax Set<Entry<K, V>> entrySet() Parameters It does not take any…

HashSet clear() Method in Java

The clear() method of HashSet removes all the elements from the HashSet. The HashSet becomes empty after the call to the clear() method. Syntax Parameters…

HashSet isEmpty() Method in Java

The isEmpty() method of HashSet checks if the HashSet is empty or not. If the HashSet is empty then it returns true otherwise returns false.…

HashSet clone() Method in Java

The clone() method of HashSet returns a shallow copy of this HashSet instance. It overrides the clone() method of Object. Syntax Parameters It does not…

HashSet remove() Method in Java

The remove(Element e) method of HashSet removes the specified element from the set. Syntax Parameters e is the element to be removed Return Value It…

HashSet size() Method in Java

The size() method of HashSet returns the number of elements available in the HashSet. Syntax Parameters It does not take any parameter Return Value It…

HashSet contains() Method in Java

The contains(Element e) method of HashSet checks if the HashSet contains the specified element or not. It returns true if the HashSet contains the specified…

HashSet add() Method in Java

The add(E element) method of HashSet inserts the specified element into the set. It returns false if the set already contains the specified element otherwise…

LinkedList add() Method in Java

The add(E element) of LinkedList appends the specified element at the end of the list. We can also add an element at a specific position…

LinkedList addFirst() Method in Java

The addFirst(E element) method of LinkedList appends the specified element at the beginning of this linked list. It does not return anything. Syntax Parameters e…