- 3
- 0
- 约6.89千字
- 约 25页
- 2017-08-19 发布于广东
- 举报
* * * * * * * * * * * * * * * * * * * 第5章 阵 列 一维数组、二维数组 进阶数组观念 一维数组对象 宣告一个数组并初始数组内容 指定的索引值不可超出数组范围 会发生ArrayIndexOutOfBoundsException length为数组对象的属性成员 int[] score = {90, 85, 55, 94, 77}; for(int i = 0; i score.length; i++) System.out.printf(score[%d] = %d\n, i, score[i]); 一维数组对象 当您宣告一个数组时,其实就是在配置一个数组对象 一个完整的数组宣告方式如下 int[] arr = new int[10]; 一维数组对象 数据型态 初始值 byte 0 short 0 int 0 long 0L float 0.0f double 0.0d char \u0000 boolean false 一维数组对象 int[] arr = new int[10]; System.out.print(arr初始值: ); for(int i = 0; i arr.length; i++) {
您可能关注的文档
- IT职业英语电子教案高巍巍 Unit10 Computer Security 10 2 listening.ppt
- IT职业英语电子教案高巍巍 Unit10 Computer Security 10 3 speaking.ppt
- IT职业英语电子教案高巍巍 Unit10 Computer Security 10 4 writting.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 1 reading.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 2 listening.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 3 speaking.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 4 writting.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 1 reading.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 2 listening.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 3 speaking.ppt
- 储氢技术研究进展及挑战与机遇.docx
- 处方管理办法测试题及答案.docx
- 2026年卫生专业技术资格考试口腔修复学(中级356)专业知识梳理策略详解.docx
- 高中英语2026届高考阅读完型高频短语动词(含例句共170个).docx
- TEERT《废弃矿区历史遗留固体废物污染治理技术规范》.docx
- 2026年广东统招专升本计算机基础与程序设计-黄金考点汇编.docx
- 2023-2024学年浙江省A9协作体高二下学期期中联考政治试题含答案.docx
- DB61∕T 1931-2024 冷料超薄罩面施工技术规范.docx
- 联盟学校2026年5月高三模拟考试日语.docx
- 2026年七年级下册英语期中模拟卷(全解全析)(广东专用).docx
原创力文档

文档评论(0)