package com.testenhanced;
import java.util.* ;
import java.util.Collection;
public class TestEnhanced {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] arr = {1,2,3,4,5,6} ;
for(int i: arr) {
System.out.println(i) ;
}
Collection c = new ArrayList() ;
c.add(new String ("asd")) ;
c.add(new String ("lmn")) ;
c.add(new String("156")) ;
for(Object o: c) {
System.out.println(o) ;
}
}
}
console:
1
2
3
4
5
6
asd
lmn
156
//
除了简单遍历并读出其中的内容外,不建议使用增强for
分享到:
相关推荐
Enhanced k-Means Clustering Algorithm for Malaria Image
用于解决Atom本地安装markdown-preview-enhanced插件时出现的找不到"@shd101wyy"等文件夹的问题,使用时确认"markdown-preview-enhanced"文件夹在".atom\packages" 文件夹下,将此压缩文件解压后的"node_modules...
mation, yielding great values for both users and service providers. However, this problem is perceptibly complex because various data trends need to be considered together. This includes the spatial ...
EDSR-Enhanced Deep Residual Networks for Single Image Super-Resolution,pytorch实现的,欢迎各位下载!
Philipp Bergmeir works on the development and enhancement of data mining and machine learning methods with the aim of analysing automatically huge amounts of load spectrum data that are recorded for ...
JDK5增强for循环的使用,与以前的for循环保额不同!
The Enhanced Host Controller Interface (EHCI) specification describes the register-level interface for a Host Controller for the Universal Serial Bus (USB) Revision 2.0. The specification includes a ...
设备自动化协会标准文档,半导体制造行业自动运输系统需要遵守的通讯标准。自99年在E23的基础上制定了E84后,E84逐渐成为主流,开发必备。
联邦图像分类的增强表示法_FedBABU Towards Enhanced Representation for Federated Image Classification.pdf
一种新的隐私增强的临时社交网络群体相亲服务,刘露,,当前的群体相亲使用的技术比较低端,因此在相亲过程中导致许多尴尬和不便。本文提出一种新的隐私增强的临时社交网络群体相亲服务
5G Service requirements for enhanced V2X scenarios.pdf
Review on Enhanced GPSR protocol For Wireless Sensor Networks.pdf
带有知识注入的预训练模型(knowledge enhanced pre- training model, KEPTMs)具有深刻的理解和逻辑推理能力,并在一定程度上引入了可解释性。在这个综述中,我们提供了自然语言处理的KEPTMs的全面概述。首先介绍了预...
Enhanced Deep Residual Networks for Single Image Super-Resolution
This document defines the low speed electrical and management interface specifications for enhanced Small Form Factor Pluggable(SFP+) modules and hosts. The SFP+ module is a hot pluggable small ...
Enhanced Write Filter (EWF) For XPE 分为RAM和DISK两种模式,无需安装按照安装说明安装即可,安装时注意注册表文件和所需要的模式是否一致!
-This is a Matlab implementation for the forwards additive version of ECC image alignment algorithm based on the paper "G.D. Evangelidis, E.Z. Psarakis, Parametric Image Alignment using Enhanced ...
深入学习以增强抓取输入_Deep Learning for Enhanced Scratch Input.pdf
Also includes an Enhanced TemplateField to enable the FilterTemplate, as well as an Enhanced CommandField to allow for a filter button, resolve image button double postbacks, and enable some of the ...
An Enhanced Gravitational Search Algorithm for Global Optimization