摘要: 1 import java.util.Date; 2 public class Example4_16 { 3 public static void main(String[] args) { 4 Date date=new Date(); 5 System.out.println("本地机器的时间 阅读全文
posted @ 2020-12-09 23:25 李家宇 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 public class Example4_11 { 3 public static void main(String[] args) { 4 Scanner scanner=new Scanner(System.in); 5 int[] a={12, 阅读全文
posted @ 2020-12-08 17:50 李家宇 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 1 class Cylinder { 2 private double radius; 3 private int height; 4 private double pi=3.14; 5 String color; 6 public Cylinder() { 7 this(2.5,5,"红色"); 阅读全文
posted @ 2020-12-07 19:08 李家宇 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 周五回家了,这两天也没有更新代码系列,很抱歉,之后会补上。今天刚到宿舍,写了会代码,想用一个数组的从键盘输入,再也弄不好了,最终在我不断的翻之前写的代码,终于是找到了一个例子,真的不容易,编程这东西,稍微几天不用就能忘。这也让我意识到认真巩固的重要性,有些东西看过之后懂了,过了段时间再看就不一定知道 阅读全文
posted @ 2020-12-06 20:55 李家宇 阅读(122) 评论(3) 推荐(0) 编辑
摘要: 1 class Cylinder { 2 private double radius; 3 private int height; 4 private double pi=3.14; 5 private String color; 6 public double setCylinder(double 阅读全文
posted @ 2020-12-04 13:37 李家宇 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1 class Person { 2 String name; 3 private int age; 4 public boolean setAge(int newAge) { 5 if(newAge>=5&&newAge<=20) { 6 age=newAge; 7 return true; 8 阅读全文
posted @ 2020-12-03 12:13 李家宇 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 public class O3_5 { 3 public static void main(String[] args) { 4 String str,newStr=" "; 5 char DeleteChar='a',temp; 6 Scanner 阅读全文
posted @ 2020-12-02 13:23 李家宇 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.Arrays; 2 public class O3_4 { 3 public static void main(String[] args) { 4 int i,j; 5 int[][] a=new int[2][3]; 6 for(i=0;i<a.length 阅读全文
posted @ 2020-12-01 12:35 李家宇 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 class O3_3 { 3 public static void main(String args[ ]) { 4 String s; 5 char c; 6 int nDig,nChar,nOther; 7 nDig=nChar=nOther=0; 阅读全文
posted @ 2020-11-30 22:27 李家宇 阅读(105) 评论(2) 推荐(1) 编辑
摘要: 1 import java.util.*; 2 class O3_2 { 3 public static void main(String args[ ]) { 4 Scanner buf=new Scanner(System.in); 5 int[][] nums=new int[2][3]; 6 阅读全文
posted @ 2020-11-29 14:17 李家宇 阅读(107) 评论(1) 推荐(0) 编辑