import java.util.ArrayList;
import java.util.List;
public class StartMain {
public static void main(String [] args){
//第一个程序,HelloWorld
HelloWorld h = new HelloWorld();
h.practice();
//判断语句,if--else练习
IfPractice ifPractice = new IfPractice();
int score=65;
System.out.println(ifPractice.practice(score));
//判断语句,三目运算符练习
TernaryPractice t = new TernaryPractice();
System.out.println(t.practice(score));
//判断语句,switch语句练习
SwitchPractice s = new SwitchPractice();
System.out.println(s.practice(score));
List<Student>students = new ArrayList<Student>();
students.add(new Student("小明",12,Constant.MAN,65));
students.add(new Student("小强",12,Constant.MAN,75));
students.add(new Student("小刚",12,Constant.MAN,85));
students.add(new Student("小红",12,Constant.WOMAN,95));
students.add(new Student("小兰",12,Constant.WOMAN,55));
students.add(new Student("小芳",12,Constant.WOMAN,100));
//循环语句,for循环练习
ForPractice f = new ForPractice();
f.practice(students);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
for循环练习--示例
共16个文件
java:8个
class:8个
需积分: 10 6 下载量 113 浏览量
2017-04-13
16:15:12
上传
评论 2
收藏 9KB ZIP 举报
温馨提示
该资源包含for循环的练习代码,以及我之前上传的所有代码
资源推荐
资源详情
资源评论
收起资源包目录
demo.zip (16个子文件)
demo
bin
ForPractice.class 1KB
StartMain.class 1KB
HelloWorld.class 406B
Constant.class 266B
TernaryPractice.class 627B
SwitchPractice.class 609B
Student.class 1KB
IfPractice.class 621B
src
HelloWorld.java 97B
Constant.java 108B
IfPractice.java 464B
ForPractice.java 655B
TernaryPractice.java 333B
StartMain.java 1KB
SwitchPractice.java 409B
Student.java 879B
共 16 条
- 1
资源评论
鲁豫小哥
- 粉丝: 11
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功