摘要: package com.Leo.struct;public class DoWhileDemo01 { public static void main(String[] args) { int i = 0; int sum = 0; do { sum += i; i++; }while (i<=10 阅读全文
posted @ 2021-06-09 09:24 Leoyuan 阅读(40) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.struct;public class WhileDemo01 { public static void main(String[] args) { //输入0-100 int i = 0; while (i<100){ i++; System.out.println 阅读全文
posted @ 2021-06-09 09:11 Leoyuan 阅读(49) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.struct;public class SwitchDemo01 { public static void main(String[] args) { //case 穿透 //switch 匹配一个具体的值 char grade = 'B'; switch (grad 阅读全文
posted @ 2021-06-09 08:44 Leoyuan 阅读(41) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.struct;import java.util.Scanner;public class IfDemo02 { public static void main(String[] args) { Scanner scanner = new Scanner(System. 阅读全文
posted @ 2021-06-08 22:28 Leoyuan 阅读(33) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.struct;//顺序结构public class Demo01 { public static void main(String[] args) { System.out.println("hello1"); System.out.println("hello2") 阅读全文
posted @ 2021-06-08 21:40 Leoyuan 阅读(19) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.scanner;import java.util.Scanner;public class Demo04 { public static void main(String[] args) { Scanner scanner = new Scanner(System.i 阅读全文
posted @ 2021-06-08 14:17 Leoyuan 阅读(38) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.scanner;import java.util.Scanner;public class Demo01 { public static void main(String[] args) { //创建一个扫描对象,用于接受键盘数据 Scanner scanner = 阅读全文
posted @ 2021-06-08 13:35 Leoyuan 阅读(30) 评论(0) 推荐(0) 编辑
摘要: package com.Leo.base;/** * @author Leo * @version 1.0 * @since 1.8 */public class Doc { String name; /** * @authour Leo * @param name * @return * @thr 阅读全文
posted @ 2021-06-07 13:27 Leoyuan 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-06-07 13:06 Leoyuan 阅读(16) 评论(0) 推荐(0) 编辑
摘要: package operator;//三元运算符public class Demo08 { public static void main(String[] args) { // x ? y : z //如果x==true,则结果为y,否则结果为z int score = 80; String ty 阅读全文
posted @ 2021-06-07 12:52 Leoyuan 阅读(47) 评论(0) 推荐(0) 编辑