我是靠谱客的博主 彪壮枕头,这篇文章主要介绍map集合的putall_Map接口的putAll()方法如何使用?,现在分享给大家,希望可以做个参考。

展开全部

我们可以编辑如下32313133353236313431303231363533e78988e69d8331333365646261代码:

import java.util.HashMap;

import java.util.Map;

import java.util.Scanner;

import java.util.Set;

public class MapTest

//创建一个Map

public Map student;

public MapTest()

this.student = new HashMap();

public void testPut()

Scanner sc = new Scanner(System.in);

int i = 0;         while(i<3)

System.out.println

String stuID = sc.next() Student stu = student.get(stuID);

if(stu == null)

public void testPut()

Scanner sc = new Scanner(System.in);

int i = 0;         while(i<3)

System.out.println

String stuID = sc.next() Student stu = student.get(stuID);

if(stu == null)

public Map student;

public MapTest()

this.student = new HashMap();

最后

以上就是彪壮枕头最近收集整理的关于map集合的putall_Map接口的putAll()方法如何使用?的全部内容,更多相关map集合内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部