05 2022 档案

摘要:构造器类:public class persontext { //一个类即使什么都不写,它也会存在一个方法 //显示的定义构造器 String name; //1.使用new关键字,本质是在调用构造器 //2.用来初始化值 public persontext() { } public persont 阅读全文
posted @ 2022-05-12 21:33 韶光贱 阅读(19) 评论(0) 推荐(0)
摘要:public class continueDamon { public static void main(String[] args) { int i = 0; while (i<100){ i++; if (i%10==0){ System.out.println(); continue; } S 阅读全文
posted @ 2022-05-10 20:15 韶光贱 阅读(13) 评论(0) 推荐(0)
摘要:import org.omg.CosNaming.IstringHelper;public class switch语法Damon { public static void main(String[] args) { char grade = 'C';// switch (grade){// cas 阅读全文
posted @ 2022-05-10 20:14 韶光贱 阅读(41) 评论(0) 推荐(0)
摘要:import java.util.Scanner;public class Damon01 { public static void main(String[] args) {// Scanner sc = new Scanner(System.in);// System.out.println(" 阅读全文
posted @ 2022-05-10 20:12 韶光贱 阅读(46) 评论(0) 推荐(0)
摘要:import java.util.Scanner;public class ifDamon01 { public static void main(String[] args) { //if 单选择结构// Scanner scanner = new Scanner(System.in);// Sy 阅读全文
posted @ 2022-05-10 20:11 韶光贱 阅读(29) 评论(0) 推荐(0)
摘要:public static void main(String[] args) { //练习1:计算0到100之间的奇数和偶数的和// int oddSum = 0;// int evenSum = 0;//// for (int i = 0; i <= 100; i++) {// if (i%2!= 阅读全文
posted @ 2022-05-10 18:08 韶光贱 阅读(41) 评论(0) 推荐(0)
摘要:public class math99Damon01 { public static void main(String[] args) { for (int j = 1; j <= 9; j++){ for (int i = 1; i <=j; i++){ System.out.print(j+"* 阅读全文
posted @ 2022-05-10 18:03 韶光贱 阅读(28) 评论(0) 推荐(0)