1.8作业
2016-01-08 22:42
399 查看
public class WEI { public static void main(String[] args) { // 创建一维数组arr[],并将其遍历输出。 int arr[] = new int[] { 54, 65, 89, 789, 231 }; // 用foreach语句 for (int f : arr) { System.out.println("输出为:" + f); } int min = arr[0]; for (int a = 0; a < arr.length; a++) { if (min < arr[a]) { min = arr[a]; } } System.out.println("最大的数为" + min); } }
public class WEI { public static void main(String[] args) { //创建一维数组arr[],并将其遍历输出。 int arr []=new int[]{ 54,65,89,789,231}; //用foreach语句 for(int f : arr ) { System.out.println("输出为:"+f); } } }
相关文章推荐
- kinetis design studio配置及程序运行
- 误删除系统libselinux.SO.1,导致系统命令基本上都不能使用--附解决问题的整个过程
- Linux系统启动流程
- CABasicAnimation的基本使用方法(移动·旋转·放大·缩小)
- IBatis配置一对一、一对多两种实现方式
- JAVA中重写equals()方法的同时要重写hashcode()方法
- Thinkphp框架中使用数据对象自动处理添加数据库数据时,关于在数据库表中添加新列时出现新列的数据添加不上去?
- 【转】字符编码
- 如何分析Android的Log
- Same Tree 判断俩树是不是一样
- java-NoSuchMethodError问题解决——傻瓜式
- 企业服务总线解决方案剖析,第 1 部分: 企业服务总线的基本概念
- com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "safeKey"
- Windows server 2008 R2 AD DS搭建
- Android设置监听回调的方式
- 使用tableview的表头button 实现多 cell 的选择
- 9、SQL Server 操作数据
- Nginx 安装(Linux CentOS)
- 使用hexo创建github博客
- win7上python+theano+keras安装