社区
Web 开发
帖子详情
请教关于Hashtable的使用!
attiseve
2003-06-09 09:05:08
Hashtable怎么用?用不用try{...}catch{...},抛出什么类?怎么按照j2sdk_doc中介绍的Hashtable的使用方法也不行?
...全文
86
4
打赏
收藏
请教关于Hashtable的使用!
Hashtable怎么用?用不用try{...}catch{...},抛出什么类?怎么按照j2sdk_doc中介绍的Hashtable的使用方法也不行?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
yangjuanli
2003-06-09
打赏
举报
回复
gdsean(摇滚java) 写的基本正确,
只是非曲直 System.out.println("two = " n);
应写成 System.out.println("two = " + n);
gdsean
2003-06-09
打赏
举报
回复
This example creates a hashtable of numbers. It uses the names of the numbers as keys:
Hashtable numbers = new Hashtable();
numbers.put("one", new Integer(1));
numbers.put("two", new Integer(2));
numbers.put("three", new Integer(3));
To retrieve a number, use the following code:
Integer n = (Integer)numbers.get("two");
if (n != null) {
System.out.println("two = " n);
}
attiseve
2003-06-09
打赏
举报
回复
谢谢关注!
javastu
2003-06-09
打赏
举报
回复
关注!
asp.net知识库
如何判断ArrayList,
Hashtable
,SortedList 这类对象是否相等 帮助解决网页和JS文件中的中文编码问题的小工具 慎用const关键字 装箱,拆箱以及反射 动态调用对象的属性和方法——性能和灵活性兼备的方法 消除由try/...
HashTable
-389-Find the Difference
//依然是
使用
异或 class Solution { public char findTheDifference (String s, String t) { char [] a = s.toCharArray(); char [] b = t.toCharArray(); char result = 0 ; int len = a.length;...
hashtable
与HashMap区别
看到了很多的面试题集里都有这么一个题:HashMap和
Hashtable
的区别,自己也看了好几遍了,总是不记得,写下来当是一次笔记吧. 区别一它们的父类不同 public class
Hashtable
<K,V> extends Dictionary<K,V> ...
关于一个
Hashtable
的小小问题
public bool InsertEmp(Employees emp) {
Hashtable
ht=new
Hashtable
(); ht.add("No",emp.No); ... return Insert(ht,"Employee); }
HashMap和
Hashtable
的区别
看到了很多的面试题集里都有这么一个题:HashMap和
Hashtable
的区别,自己也看了好几遍了,总是不记得,写下来当是一次笔记吧. 区别一它们的父类不同 public class
Hashtable
extends Dictionary implements Map, ...
Web 开发
81,091
社区成员
341,718
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章