In this example we are checking whether a particular value exists in HashMap or not. We will be using containsValue() method of HashMap class to… [Read More]
Java – Get size of HashMap example
In this example we are gonna see how to get the size of HashMap using size() method of HashMap class. Method definition and description are… [Read More]
Java – HashMap Iterator example
Example In the previous tutorial we have seen different-2 ways to iterate a HashMap. In this example we are gonna see how to iterate a… [Read More]
Java – Remove all mappings from HashMap example
Example In the last tutorial we shared how to remove a specific mapping from HashMap based on key. In this example we are going to… [Read More]
Java – Remove mapping from HashMap example
Example In this example we are gonna see how to remove a specific mapping from HashMap using the key value of Key-value pair. We will… [Read More]
Java – Get element from specific index of LinkedList example
In this example we are gonna see how to get an element from specific index of LinkedList using get(int index) method: public E get(int index):… [Read More]
Java – Check if a particular element exists in LinkedList example
In this example we are gonna see how to check if a particular element exists in LinkedList using contains() method: public boolean contains(Object o): Returns… [Read More]
Java – Add elements at beginning and end of LinkedList example
Example In this example we will learn how to add elements at the beginning and end of a LinkedList. We will be using addFirst() and… [Read More]
How to convert LinkedList to array using toArray() in Java
Converting LinkedList to array is very easy. You can convert a LinkedList of any type (such as double, String, int etc) to an array of… [Read More]
Java – Convert a LinkedList to ArrayList
Example In this example we are converting a LinkedList to ArrayList. We have a LinkedList of Strings in which we are storing names of 5… [Read More]
- « Previous Page
- 1
- …
- 5
- 6
- 7
- 8
- 9
- …
- 16
- Next Page »