摘要: 阅读全文
posted @ 2023-06-07 21:18 镰刀战士 阅读(18) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-06-07 21:15 镰刀战士 阅读(15) 评论(0) 推荐(0)
摘要: final与abstract互斥 final目的是绝育,abstract目的是让子类继承并重写 阅读全文
posted @ 2023-06-06 21:41 镰刀战士 阅读(17) 评论(0) 推荐(0)
摘要: Scanner input = new scanner(); String code = input.next(); 错误写法://String code = input.toString(); 1、输入字符串 遇到空格或者换行结束 Scanner sc=new Scanner(System.in) 阅读全文
posted @ 2023-06-06 19:25 镰刀战士 阅读(2699) 评论(0) 推荐(0)
摘要: 造成这个错误的原因有两个 1、把Teacher类定义成静态类 2、把Teacher和Test类分开 阅读全文
posted @ 2023-06-03 04:34 镰刀战士 阅读(506) 评论(1) 推荐(0)
摘要: static修饰的方法可以直接用方法名. 访问 实例成员方法必须永实例成员调用 阅读全文
posted @ 2023-03-02 01:58 镰刀战士 阅读(26) 评论(0) 推荐(0)
摘要: System.out.printf("%4d",x); printf("%4d",x); 保留小数点后两位也可以用%.2f 相对来说很好记了 回车用\n 阅读全文
posted @ 2023-02-07 22:17 镰刀战士 阅读(35) 评论(0) 推荐(0)
摘要: package com.ittrash;import java.util.Scanner;public class zzul1074 { public static void main(String[] args) { Scanner input = new Scanner(System.in); 阅读全文
posted @ 2023-02-07 22:12 镰刀战士 阅读(25) 评论(0) 推荐(0)
摘要: import java.util.Scanner;/** * 限制解是正数,且脚数为偶数即可 */public class zzul1073 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); 阅读全文
posted @ 2023-02-07 22:12 镰刀战士 阅读(23) 评论(0) 推荐(0)
摘要: import java.util.Scanner;public class zzul1058 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextIn 阅读全文
posted @ 2023-02-07 22:11 镰刀战士 阅读(28) 评论(0) 推荐(0)