当前位置: 首页 > news >正文

网站建设工作经历东莞房价会跌吗

网站建设工作经历,东莞房价会跌吗,报考大专学历需要什么条件,历史建筑信息平台1 编码规范——卫语句 表达异常分支时#xff0c;少用if-else方式。   比如成绩判断中对于非法输入的处理#xff1a; /*90 100 优秀80 90 良好70 80 一般60 70 及格60 不及格*/Testpu…1 编码规范——卫语句 表达异常分支时少用if-else方式。   比如成绩判断中对于非法输入的处理 /*90 100 优秀80 90 良好70 80 一般60 70 及格60 不及格*/Testpublic void test2() {//int score 78;//通过Scanner可以实现从控制台输入信息Scanner scanner new Scanner(System.in);System.out.println(请输入成绩);int score scanner.nextInt();if(score 0 || score 100) {System.out.println(非法输入);} else if (score 90 score 100) {System.out.println(优秀);} else if (score 80 score 90) {System.out.println(良好);} else if (score 70 score 80) {System.out.println(一般);} else if (score 60 score 70) {System.out.println(及格);} else {System.out.println(不及格);}}修改后 Testpublic void test2() {//通过Scanner可以实现从控制台输入信息Scanner scanner new Scanner(System.in);System.out.println(请输入成绩);int score scanner.nextInt();//卫语句1if (score 0 || score 0) {//异常和正常 要分开System.out.println(Invalid input!);//后面的代码不再执行return;}//卫语句2...//合法输入if (score 90 score 100) {System.out.println(优秀);} else if (score 80 score 90) {System.out.println(良好);} else if (score 70 score 80) {System.out.println(一般);} else if (score 60 score 70) {System.out.println(及格);} else {System.out.println(不及格);}}2 循环控制语句(接Day2) 2.2 continue、break    还是跟C语法相差无几放个demo了事    continue跳出本次循环继续下一次循环    break跳出离他最近的那层循环 Test//结果: 1 2 4 5 public void test44() {for (int i 1; i 5; i) {if (i 3) {continue;}System.out.println(i);} }Test//结果: 1 2 public void test45() {for (int i 1; i 5; i) {if (i 3) {break;}System.out.println(i);} }Test// public void test46() {//i,j,kfor (int i 1; i 5; i) {System.out.println(i: i);for (int j 1; j 5; j) {if (j 3) {break;}System.out.println(j: j);}} }2.3 双重for循环    这个也很简单,    双重for循环    外层循环控制行数数一下有几行就能确定外层循环。    内层循环控制列数这一行打印多少个到底要打印多少个要找出和当前行之间的一个关系。    还有一些打印金字塔, 各种三角形的题统一放到下一篇作业博客吧.  2.4 Switch    这部分当初学的时候没感觉有啥特别的但是同种情况的case可以合并这个操作是真的有点没记起来温故知新了。 import com.sdust.day2.*;Test//月份 天数public void test2() {Scanner scanner new Scanner(System.in);Homework day2 new Homework();System.out.println(please input month: );int month scanner.nextInt();if (month 1 || month 12) {System.out.println(invalid month);return;}switch (month) {case 1:case 3:case 5:case 7:case 8:case 10:case 12:System.out.println(31days);break;case 4:case 6:case 9:case 11:System.out.println(30days);break;case 2:System.out.println(please input year: );int year scanner.nextInt();if (day2.judgeLeapYear(year)) {System.out.println(29days);} else {System.out.println(28days);}default:System.out.println(default);break;}}昨天写了几个作业题包括一个闰年判断的题于是在今天写这部分代码对闰年进行特判的时候心血来潮想直接调用昨天的代码。先是要导包仿照Scanner输入的形式写了一下发现还真行嗯基础的Java也就那么回事嘛~
http://www.w-s-a.com/news/850986/

相关文章:

  • 外贸专业网站的公司百度旗下13个app
  • 物理组简介 网站建设高师院校语言类课程体系改革与建设 教学成果奖申报网站
  • 爱网站无法登录怎么回事手表网
  • 网站建设公司现在还挣钱吗山西手动网站建设推荐平台
  • 重庆建设工程交易信息网站网站制作公司起名
  • 东莞寮步做网站的有吗企业宣传册制作
  • 做网站的软件是哪个上蔡做网站
  • 前后端分离实现网站开发紧急通知网页升级
  • 河北专业网站建设公司推荐佛山小程序开发平台
  • 网站开发强制开启浏览器极速模式建设网站有什么风险
  • 360全景网站建设常州专业网站建设公司咨询
  • 重庆大渡口网站建设网站增加一体化建设功能的好处
  • 网站开发完整视频网站上传 404
  • 自适应网站做推广北京建设工程招标网
  • 外贸网站设计注意事项网上商城官网入口
  • 正规的营销型网站建设公司微官网是网站吗
  • 南京行业门户网站无锡阿里巴巴做网站
  • 河北省和城乡住房建设厅网站wamp wordpress打不开
  • 在哪个平台做网站比较好自动app优化
  • 有没有能帮人快速网站备案的机构个人学做网站
  • 凌云县 城市建设 网站西安市建网站
  • 织梦xml网站地图公众号公众平台
  • 长春省妇幼网站做四维学校网站系统破解版
  • 安阳免费搭建自己的网站个人网站做商城会怎样
  • 网站建设专家公司排行网站举报有奖平台
  • 程序员不是做网站的公司装修效果全景图
  • 桥东区住房和建设局网站怎么做网上问卷
  • 做期货要看哪些网站伪装的福祉 wordpress
  • 做网站需要多少费用网站建设需要懂什么语言
  • 网站手机端做app开发商城设计方案