摘要: package com.karl; import java.util.Random; import java.util.Scanner; public class GameDemo { public static void main(String[] args) { //1.生成一个随机号码 Ran 阅读全文
posted @ 2023-05-28 11:35 Karlshell 阅读(12) 评论(0) 推荐(0)
摘要: package com.karl; import com.sun.net.httpserver.SimpleFileServer; public class forDemo { //应用场景 //减少代码的重复编写,灵活的控制程序的执行 //打印多行HelloWord public static v 阅读全文
posted @ 2023-05-28 11:34 Karlshell 阅读(82) 评论(0) 推荐(0)
摘要: package com.karl; public class doWhileDemo { public static void main(String[] args) { /** * do-while循环格式 * do{ * 循环语句; * 迭代语句; * }while(循环条件); * * * * 阅读全文
posted @ 2023-05-28 11:33 Karlshell 阅读(31) 评论(0) 推荐(0)
摘要: package com.encapsulation; public class Student { private double score; public void setSore(double score){ if (score>=0 && score<=100){ this.score=sco 阅读全文
posted @ 2023-05-28 11:33 Karlshell 阅读(14) 评论(0) 推荐(0)
摘要: package com.Demo; import java.util.Scanner; public class DYtest { public static void main(String[] args) { //1.设计一个电影类 //2.设置一个电影操作类 //3.准备 全部电影信息 DY1 阅读全文
posted @ 2023-05-28 11:31 Karlshell 阅读(82) 评论(0) 推荐(0)
摘要: package com.Demo; import java.util.Random; import java.util.Scanner; //双色球系统 public class Test8 { public static void main(String[] args) { int[] uesrn 阅读全文
posted @ 2023-05-28 11:30 Karlshell 阅读(57) 评论(0) 推荐(0)
摘要: package com.Demo; //找素数 public class Test7 { public static void main(String[] args) { System.out.println("当前素数的个数是:"+sea(101,200)); } public static in 阅读全文
posted @ 2023-05-28 11:29 Karlshell 阅读(22) 评论(0) 推荐(0)
摘要: package com.Demo; import java.util.Random; import java.util.Scanner; //抢红包 public class Test6 { public static void main(String[] args) { int[] moneys= 阅读全文
posted @ 2023-05-28 11:29 Karlshell 阅读(13) 评论(0) 推荐(0)
摘要: package com.Demo; //数组的拷贝 public class Test5 { public static void main(String[] args) { int[] arr={11,22,33}; int[] arr2=copy(arr); dayin(arr2); } pub 阅读全文
posted @ 2023-05-28 11:28 Karlshell 阅读(12) 评论(0) 推荐(0)
摘要: package com.Demo; //加密数字 public class Test4 { public static void main(String[] args) { System.out.println(encry(1983)); } //2.加密数字 public static Strin 阅读全文
posted @ 2023-05-28 11:27 Karlshell 阅读(33) 评论(0) 推荐(0)