`
chamwarren
  • 浏览: 13004 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

for each 的妙用

    博客分类:
  • java
阅读更多
import java.util.Random;
public class ForEachFloat {
	public static void main(String[] args) {
		Random r = new Random(50);
		float[] f = new float[10];
		for(int i = 0 ; i < 10; i++) {
			f[i] = r.nextFloat();
		}
		for(float fl: f) {
			System.out.println("f:"+fl);
		}
	}
}

 

分享到:
评论

相关推荐

    2018高考英语必考点妙解专题动词202005191122

    - “talked to each other”应改为“talk to each other”,因为上下文需要一般现在时。 - “go to college”应改为“going to college”,在对比结构中,动名词短语作为主语。 此外,动词时态的错误也是常见问题,...

    java开源软件项目网络爬虫-webharvest

    Each processor can be regarded as a function - it has zero or more input parameters and gives a result after execution. Processors could be combined in a pipeline, making the chain of execution. For ...

    自己整理的一份比较靠谱的flash 面试题

    IDE的妙用 IDE中的profiler是一个非常有用的工具,为你的内存管理提供了很好的支持。 CPU运算的优化 可以使用乘法替代除法,但这种方法只有在大量运算时效果才会明显。尽量少用Math内的方法,取整可以直接使用int...

    史上最全的英语语法大全(精心整理).doc

    * “the”的妙用 * anyone/any one;no one/none;every/each * both, either, neither, all, any, none * many, much * few, little, a few, a little 形容词和副词 * 形容词及其用法 * 以-ly结尾的形容词 * 用...

Global site tag (gtag.js) - Google Analytics