IT. Expert System.

Java basics

putAll()


The putAll(Map m) method is used to copy all of the mappings from the specified map to this map.

Syntax:
public void putAll(Map m)


Example:

package com.technicia;

import java.util.*;

public class HashMapDemo {
   public static void main(String args[]) {
      // create two hash maps
      HashMap newmap1 = new HashMap();
      HashMap newmap2 = new HashMap();
      
      // populate hash map
      newmap1.put(1, "tutorials");
      newmap1.put(2, "point");
      newmap1.put(3, "is best");
      
      System.out.println("Values in newmap1: "+ newmap1);
      
      // put all values in newmap2
      newmap2.putAll(newmap1);

      System.out.println("Values in newmap2: "+ newmap2);
   }    


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 309 / 158769166. Delta: 0.02759 с