for each
public class ArrayForeach{
public static void main(String []args){
int [][]a={{1,2,3},{4,5,6},{7,8,9},{10,11,12}} ;
for(int []row:a)
{
for(int element:row)
System.out.println(element);
}
}
}

随机推荐
- google查询技巧
技巧一:使用正确的方法 无论你是使用一个简单或是高级的Google搜索,在此都存在你应该使用的某种可靠的方法.遵循适当的方法你就能获得非常准确的结果:要是忽略这条建议的话,你也许就会看到大量不相关的结 ...
- 将Unity3D游戏移植到Android平台上
将Unity3D游戏移植到Android平台是一件很容易的事情,只需要在File->Build Settings中选择Android平台,然后点击Switch Platform并Build出ap ...
- ThinkPHP学习笔记 实例化模型的四种方法
创建Action类 [php] <?php class NewObjectAction extends Action{ public function index(){ ...
- OpenCV+QT开发环境(一):Windows环境
最近在学习openCV的开发.在搭建开发环境的时候,着实废了不少功夫,找了大量的文章资料.其实主要的开发还是在linux系统上的openCV,但是为了方便,我还是在windows上也搭建了开发环境,这 ...
- linux消息队列的使用
消息队列 *消息队列是内核地址空间中的内部链表,通过内核在各个进程之间传递的内容.消息顺序发送到消息队列中,每个消息队列都有IPC标识符唯一地进行标识. msgbuf结构 struct msgbuf{ ...
- Understand User's Intent from Speech and Text
http://research.microsoft.com/en-us/projects/IntentUnderstanding/ Understanding what users like to d ...
- java 获取获取字符串编码格式
public static String getEncoding(String str) { String encode = "GB2312"; try { if (str.equ ...
- eclipse svn 修改了类名之后提交
win下面的文件名不区分大小写,所以不能只是把小写类名改成大写. 正确的做法有如下两种:1,先删除类a,提交,此操作会删除服务器上的文件.再添加类A,提交.2,重命名a为aa,提交,此操作会删除服务器 ...
- 通过WebBrowser获取网页验证码
/// <summary> /// 返回指定WebBrowser中图片<IMG></IMG>中的图内容 /// </summary> /// <p ...
- could not open XXX permission denied
http://www.cplusplus.com/forum/beginner/104404/3/ -std=c++11 -std=gnu++11 Then you probably just don ...