1 package test_1_2; 2 3 public class SpaceShipControls { 4 5 /** 6 * 代理 7 */ 8 9 public void up(int velocity) { 10 11 System.out.println("up" + veloci ...
分类:
编程语言 时间:
2020-05-04 13:35:04
阅读次数:
64
public class t1 { public static void main (String []args){ int []a=new int []{1,2,3}; char []b=new char []{'a','b'}; System.out.println(a); System.out ...
分类:
编程语言 时间:
2020-05-03 18:54:35
阅读次数:
86
public class hello { public static void main(String[] args) { //单行注释:注释一行文字 //注释不被执行,但是,很重要!!! System.out.println("hello,world!"); //多行注释:注释一段文字 /* 注释 ...
分类:
编程语言 时间:
2020-05-02 20:48:35
阅读次数:
66
一、读文件操作 func FileRead(path string) { file, err := os.Open(path) if err != nil { fmt.Println("open file err=", err) } rb := make([]byte, 1024, 1024) fo ...
分类:
其他好文 时间:
2020-05-02 18:33:14
阅读次数:
63
学习自曹大,实操一遍记录 package main import "fmt" func main() { a := new(struct{}) b := new(struct{}) println(a, b, a == b) c := new(struct{}) d := new(struct{}) ...
分类:
其他好文 时间:
2020-05-02 00:01:12
阅读次数:
73
1.Lambda表达式Lambda 是一个 匿名函数, 我们可以把 Lambda表达式理解为是一段可以传递的代码。可以写出更简洁、更灵活的代码。语法格式一: 无参, 无返回值, Lambda体只需要一条语句 Runnable runnable2 = () -> System.out.println( ...
分类:
编程语言 时间:
2020-05-01 23:50:02
阅读次数:
118
//一维数组 //声明 int a[]; int[] b; //初始化 //动态初始化 a = new int[4];//能放4个int类型的数组 //静态初始化 b = new int[]{1,2,3,4};//数组中的数以确定 //数组元素的引用 System.out.println(b[1]) ...
分类:
编程语言 时间:
2020-05-01 17:01:48
阅读次数:
81
1.引入 有些时候我们不但需要定时执行任务,而且需要获得下一次执行的时间。 但是我们执行时间配置的是cron表达式,不能够根据上次执行的时间+执行间隔这种方式来获得。所以我们必须要解析cron 2.方法 Date curTime = new Date(); System.out.println(cu ...
分类:
其他好文 时间:
2020-05-01 16:37:26
阅读次数:
219
1、IDEA控制台乱码 (1)在书写普通的java程序输出中文的时候,不会出现控制台乱码的问题: public class Test { public static void main(String[] args) { System.out.println("劳动光荣"); } } 劳动光荣 (2) ...
分类:
编程语言 时间:
2020-05-01 14:20:49
阅读次数:
61
为什么使用日志打印而不是使用System.out.println()? System.out是一个io流 如果使用它打印大批量数据 会占用大量的资源 spring默认使用common-logging打印日志信息 如果我们想替换掉它 使用其他的日志工具 分为如下几步 1.排除项目对common-log ...
分类:
编程语言 时间:
2020-05-01 11:12:21
阅读次数:
76