1 Star 0 Fork 0

chpeng/java_study

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Sample17.java 707 Bytes
一键复制 编辑 原始数据 按行查看 历史
chpeng 提交于 2023-11-21 19:34 +08:00 . java learn first
public class Sample17 {
public static void main(String[] args) {
String[] cars = {"xpeng", "li", "nio"};
int[] myNum = {1,2,3,4};
System.out.println(cars[0]);
System.out.println(myNum[1]);
cars[0] = "xpengniubi";
System.out.println(cars[0]);
System.out.println(myNum.length);
for(String i : cars) {
System.out.println(i);
}
int[][] myNums= { {1,2,3,4}, {5,6,7} };
int x = myNums[1][1];
System.out.println(x);
for(int i =0; i<myNums.length; i++) {
for(int j=0; j<myNums[i].length; j++) {
System.out.println(myNums[i][j]);
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chp2020/java_study.git
git@gitee.com:chp2020/java_study.git
chp2020
java_study
java_study
master

搜索帮助