摘要: 1.break public static void main(String[] args) { int i=0; while (i<100){ i++; System.out.println(i); if (i==30){ break;//break中止循环 } } System.out.prin 阅读全文
posted @ 2020-08-13 16:11 即食内鬼 阅读(202) 评论(0) 推荐(0)
摘要: 1.public class Demo01 { public static void main(String[] args) { //创建一个扫描器对象 用于接受键盘数据 Scanner scanner = new Scanner(System.in); System.out.println("使用 阅读全文
posted @ 2020-08-13 16:03 即食内鬼 阅读(378) 评论(0) 推荐(0)
摘要: public class demo8 { public static void main(String[] args) { /*三元运算符 x?y:z x==ture则输出为y否则输出z */ int score1=80; String type1=score1>60?"及格":"不及格"; Sys 阅读全文
posted @ 2020-08-13 16:00 即食内鬼 阅读(91) 评论(0) 推荐(0)
摘要: package com.study.www.base.base.operator;//逻辑运算符public class demo5 { public static void main(String[] args) { //与 and 或 or 非 nor boolean a=true; boole 阅读全文
posted @ 2020-08-13 15:59 即食内鬼 阅读(438) 评论(0) 推荐(0)