摘要: package com.xu.scanner;import java.util.Scanner;public class Demo05 { public static void main(String[] args) { //我们可以输入多个数字,并求其总和与平均数,每输入一个数字用回车 //确认, 阅读全文
posted @ 2021-05-25 06:24 寻找加油 阅读(48) 评论(0) 推荐(0)
摘要: package com.xu.scanner;import java.util.Scanner;public class Demo04 { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); 阅读全文
posted @ 2021-05-25 06:22 寻找加油 阅读(45) 评论(0) 推荐(0)
摘要: package com.xu.scanner;import java.util.Scanner;public class Demo02 { public static void main(String[] args) { //从键盘接收数据 Scanner scanner=new Scanner(S 阅读全文
posted @ 2021-05-25 06:20 寻找加油 阅读(33) 评论(0) 推荐(0)
摘要: package com.xu.scanner;import java.util.Scanner;//导入了Scanner包public class Demo01 { public static void main(String[] args) {//创建一个main方法 //创建一个扫描对象,用于接 阅读全文
posted @ 2021-05-25 06:19 寻找加油 阅读(40) 评论(0) 推荐(0)
摘要: package com.xu.method;public class Demo04 { public static void main(String[] args) { Demo04 demo04=new Demo04(); demo04.test(1); } public void test(in 阅读全文
posted @ 2021-05-25 06:17 寻找加油 阅读(29) 评论(0) 推荐(0)
摘要: package com.xu.method;public class Demo01 { //main方法,public static是修饰符, // void是返回值,返回为空就是不返回的意思; public static void main(String[] args) { // int sum= 阅读全文
posted @ 2021-05-25 06:16 寻找加油 阅读(55) 评论(0) 推荐(0)
摘要: package com.xu.struct;public class WhileDemo02 { public static void main(String[] args) { while(true){ //这个是死循环; //等待客户连接 //定时检查 //。。。。。 } }} "D:\Prog 阅读全文
posted @ 2021-05-25 06:14 寻找加油 阅读(28) 评论(0) 推荐(0)
摘要: package com.xu.struct;public class TestDemo { public static void main(String[] args) { //打印三角形 5行 思想及拆分 for (int i = 1; i <=5; i++) { for (int j = 5; 阅读全文
posted @ 2021-05-25 06:13 寻找加油 阅读(33) 评论(0) 推荐(0)
摘要: package com.xu.struct;public class SwitchDemo01 { public static void main(String[] args) { //case穿透,写完每个case后,后面加一个break; //switch匹配一个具体的值 char grade= 阅读全文
posted @ 2021-05-25 06:12 寻找加油 阅读(44) 评论(0) 推荐(0)
摘要: package com.xu.struct;public class ShunXuDemo { public static void main(String[] args) { System.out.println("hello1"); System.out.println("hello2"); S 阅读全文
posted @ 2021-05-25 06:11 寻找加油 阅读(49) 评论(0) 推荐(0)