Enumeration
来源:互联网 发布:联通关闭2g网络 编辑:程序博客网 时间:2024/04/30 20:14
//第一个 Vector v = new Vector(); v.addElement("Lisa"); v.addElement("Billy"); v.addElement("Mr Brown"); Enumeration e = v.elements();// 返回Enumeration对象 while (e.hasMoreElements()) { String value = (String) e.nextElement();// 调用nextElement方法获得元素 System.out.print(value); }/////////////////////////////////////LisaBillyMr Brown
//第二个 Hashtable ht = new Hashtable(); ht.put("1", "One"); ht.put("2", "Two"); ht.put("3", "Three"); Enumeration e = ht.elements(); while (e.hasMoreElements()) { System.out.println(e.nextElement()); }////////////////////////////////////*ThreeTwoOne*/
0 0
- Enumeration
- Enumeration
- enumeration
- Enumeration
- Enumeration
- Enumeration
- Enumeration
- Enumeration
- Enumeration
- Enumeration
- Enumeration
- usb enumeration
- Enumeration类
- 接口 Enumeration
- OleDbType Enumeration
- Enumeration & Structure
- Enumeration接口
- ComInterfaceType Enumeration
- 内容仓库Apache JackRabbit
- css 使用变量
- iOS巅峰之label描边
- php 如何使用LigerUI grid插件
- Grunt 新手一日入门
- Enumeration
- JS开发引用HTML DOM的location和document对象
- Junit4
- android 拨打电话与发送短信
- Git Step By Step - Step 2: Go Back in Time
- nrf51822 --- 1拖8实验(2)
- C语言while循环
- 并查集/图的划分
- 剑指offer(13):打印1到最大的n位数