- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Unit Data Structure.ppt
DataStruct 刘惠 029 座机电话号码 liuhui@sei.xidian.edu.cn Unit Objectives Describe the basic Java collection mechanisms Introduce the hierarchy of interfaces and classes for dealing with collections Data Structures A data structure can be thought of as a container that is used to group multiple elements into a single representation, and is used to store, retrieve, and manipulate the contained data Basic Data Structure Mechanisms Before the development of the Java2 platform, only a small set of classes and interfaces were available in the supplied Standard Class Library for data store manipulation. arrays Vector Stack Hashtable Properties BitSet Enumeration Vector addElement elementAt elements Vector 可以放不同类型的对象 必须存放对象引用,不能存放基本数据类型 根据下标操作 矢量数组的大小可以动态改变 常用API Stack 是Vector的子类 可以放不同类型的对象 只能放对象,而不能放基本数据类型 大小可以动态改变 采用后进先出原则 HashTable 从java.util.Dictionary抽象类继承而来 只能存放对象,不能存放基本数据类型 大小可以改变 可以放不同类型的对象 每一个对象必须与一个对象关键字对应 Array 两种定义形式: int[] a1; int a1[]; 数组初始化 int[] a1 1,2,3,4,5 ; 数组赋值 int[] a2; a2 a1; Java数组从元素0开始计数,最大元素编号是length-1 public class Arrays public static void main String[] args int[] a1 1, 2, 3, 4, 5 ; int[] a2; a2 a1; for int i 0; i a2.length; i++ a2[i]++; for int i 0; i a1.length; i++ prt a1[ + i + ] + a1[i] ; static void prt String s System.out.println s ; import java.util.*; public class ArrayClassObj public static void main String[] args Integer[] a new Integer[10]; prt length of a + a.length ; for int i 0; i a.length; i++ a[i] new Integer i ; prt a[ + i + ] + a[i] ; static void prt String s System.out.println s ; Properties 从java.util.Properties类继承而来 属性和属性值都是String类型 Maps keys to values Keys and values can be any non-null object Enumeration Interface The Enumeration interface allows the developer to traverse collections at a high level, with little concern for the underlying collection. Used specifically when traversal order is not important. Vectors elements method and Hashtables keys and elements met
您可能关注的文档
最近下载
- 固定污染源自动监测系统数智化建设技术指南编制说明.docx VIP
- 空调系统臭氧消毒效果验证.doc VIP
- 初中九年级化学课件-中考专题复习之多功能瓶的使用.ppt
- 公益电影放映服务投标方案(技术方案).doc
- 译林版2024新教材小学四年级英语上册全册各单元测评试卷及答案(含8套题).docx
- 我国大学教育基金会投资管理:现状、挑战与突破路径.docx VIP
- 《固定污染源自动监测系统数智化建设技术指南》.pdf
- 用于定价美国期权的时序深度梯度流方法-计算机科学-机器学习-神经网络-金融数学-期权定价.pdf VIP
- 售后服务工程师等级方案(3篇).docx VIP
- 50MW地面分布式光伏项目建设方案.docx
文档评论(0)