BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

how to copy one hashmap content to another hashmap

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

In this tutorial we are gonna learn how to copy one HashMap elements to another HashMap. We will be using putAll() method of HashMap class… [Read More]

Tags: Collections, Java-HashMap

HashMap – Get value from key example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

Description Program to get value from HashMap when the key is provided. Example import java.util.HashMap; class HashMapDemo{ public static void main(String[] args) { // Create… [Read More]

Tags: Collections, Java-HashMap

Difference between HashSet and HashMap

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

In this article we are gonna discuss the differences between HashSet and HashMap classes. HashSet vs HashMap Differences: HashSet HashMap HashSet class implements the Set… [Read More]

Tags: Collections, Java-HashMap, Java-HashSet

Java – Get Set view of Keys from HashMap

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

Description Program to get the Set of keys from HashMap. Example import java.util.Iterator; import java.util.HashMap; import java.util.Set; class HashMapExample{ public static void main(String args[]) {… [Read More]

Tags: Collections, Java-HashMap

How to check if a HashMap is empty or not?

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

Description Program to check if a HashMap is empty or not. We are using isEmpty() method of HashMap class to perform this check. Program import… [Read More]

Tags: Collections, Java-HashMap

Clone a HashMap in Java

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

Description A program to clone a HashMap. We will be using following method of HashMap class to perform cloning. public Object clone(): Returns a shallow… [Read More]

Tags: Collections, Java-HashMap

Java – Check if a particular key exists in HashMap example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

In the last tutorial we learnt how to check whether a particular value exists in HashMap. In this example we are gonna see how to… [Read More]

Tags: Collections, Java-HashMap

Java – Check if a particular value exists in HashMap example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

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]

Tags: Collections, Java-HashMap

Java – Get size of HashMap example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

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]

Tags: Collections, Java-HashMap

Java – HashMap Iterator example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

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]

Tags: Collections, Java-HashMap

Java – Remove all mappings from HashMap example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

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]

Tags: Collections, Java-HashMap

Java – Remove mapping from HashMap example

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

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]

Tags: Collections, Java-HashMap

Difference between HashMap and Hashtable

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

What is the Difference between HashMap and Hashtable? This is one of the frequently asked interview questions for Java/J2EE professionals. HashMap and Hashtable both classes implements java.util.Map interface, however there are… [Read More]

Tags: Collections, Java-HashMap, Java-HashTable

How to loop HashMap in java

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

In this tutorial we will learn how to loop HashMap using following methods: For loop While loop + Iterator Example: In the below example we… [Read More]

Tags: Collections, Java-HashMap

How to serialize HashMap in java

Last Updated: September 11, 2022 by Chaitanya Singh | Filed Under: java

HashMap class is serialized by default which means we need not to implement Serializable interface in order to make it eligible for Serialization. In this… [Read More]

Tags: Collections, Java-HashMap

  • 1
  • 2
  • Next Page »

Java Tutorial

Java Introduction

  • Java Index
  • Java Introduction
  • History of Java
  • Features of Java
  • C++ vs Java
  • JDK vs JRE vs JVM
  • JVM - Java Virtual Machine
  • First Java Program
  • Variables
  • Data Types
  • Operators

Java Flow Control

  • Java If-else
  • Java Switch-Case
  • Java For loop
  • Java while loop
  • Java do-while loop
  • Continue statement
  • break statement

Java Arrays

  • Java Arrays

OOPs Concepts

  • OOPs Concepts
  • Constructor
  • Java String
  • Static keyword
  • Inheritance
  • Types of inheritance
  • Aggregation
  • Association
  • Super Keyword
  • Method overloading
  • Method overriding
  • Overloading vs Overriding
  • Polymorphism
  • Types of polymorphism
  • Static and dynamic binding
  • Abstract class and methods
  • Interface
  • Abstract class vs interface
  • Encapsulation
  • Packages
  • Access modifiers
  • Garbage Collection
  • Inner classes
  • Static import
  • Static constructor

Java Exception Handling

  • Exception handling
  • Java try-catch
  • Java throw
  • Java throws
  • Checked and Unchecked Exceptions
  • Jav try catch finally
  • Exception Examples
  • Exception Propagation

Collections Framework

  • Collections in Java
  • Java ArrayList
  • Java LinkedList
  • Java Vector
  • Java HashSet
  • Java LinkedHashSet
  • Java TreeSet
  • Java HashMap
  • Java TreeMap
  • Java LinkedHashMap
  • Java Queue
  • Java PriorityQueue
  • Java Deque
  • Comparable interface
  • Comparator interface
  • Collections Interview Questions

MORE ...

  • Java Scanner Class
  • Java 8 Features
  • Java 9 Features
  • Java Conversion
  • Java Date
  • Java Multithreading
  • Java I/O
  • Java Serialization
  • Java Regex
  • Java AWT
  • Java Swing
  • Java Enum
  • Java Annotations
  • Java main method
  • Java Interview Q

Copyright © 2012 – 2025 BeginnersBook . Privacy Policy . Sitemap