当前位置:网站首页>利用foreach循环二维数组
利用foreach循环二维数组
2022-06-26 09:37:00 【m0_61961898】
for (循环变量 x : 遍历对象 obj) {
引用了x的Java语句
} //不必对x进行初始化
结果
public static void main(String[] args) {
int u[][]= new int [][] {
{4,5,6},{8,1},{9,2,7,3}};
for ( int x[] : u) {
for (int y : x) {
System.out.print(y + "\t");
}
System.out.println();
}
}
}结果

边栏推荐
- c语言语法基础之——指针(字符、一维数组) 学习
- A concise tutorial for getting started with go generics
- My creation anniversary
- Constraintlayout control uses full Raiders
- Differences between JVM, Dalvik and art
- This new change of go 1.16 needs to be adapted: the changes of go get and go install
- Go learning notes (83) - code specification and common development skills
- c语言语法基础之——指针( 多维数组、函数、总结 ) 学习
- Solution to network request crash in retrofit2.8.1
- JSP file syntax
猜你喜欢

WGCLOUD的web ssh服务端口是多少

Detailed explanation of winsorflow quantum installation process

定制拦截器

Cloud native essay using Hana expression database service on Google kubernetes cluster

【LeetCode】59. 螺旋矩阵 II

Develop current learning objectives and methods

A list of common methods for customizing paint and canvas of view

This new change of go 1.16 needs to be adapted: the changes of go get and go install

Differences between JVM, Dalvik and art
![Logical English structure [key points]](/img/4b/52a666ed01087adbc5fa4f9e1db393.png)
Logical English structure [key points]
随机推荐
1. sum of two numbers (leetcode topic)
創建對象的時候堆內存的分配
Battery historian analyzes battery consumption
Leetcode refers to offer II 091 Paint house - modify in place
jar版本冲突问题解决
Why do some functions in the go standard library have only signatures but no function bodies?
Appium automation test foundation - mobile end test environment construction (II)
How do technicians send notifications?
首批12家企业入驻!广州首个集中展销老字号产品专柜开张
Nested recyclerview in nestedscrollview automatically slides to the bottom after switching
Basic string operations in C
Jupyter Notebook遇到的问题
从tf 1.x到tf 2.6(遇到的就过来更新更新)
Various errors encountered by tensorflow
Svn command
SQL function
c语言语法基础之——指针(字符、一维数组) 学习
Constraintlayout control uses full Raiders
Threadmode interpretation of eventbus
国际化配置