一、Date类 Date d= new Date(); //获取时间戳 System.out.println(d.getTime()); SimpleDateFormat fm = new SimpleDateFormat("yy-MM-dd"); System.out.println(fm.for ...
分类:
其他好文 时间:
2020-03-21 14:25:16
阅读次数:
54
package com.company.Util; import java.util.Scanner; public class Test09 { public static void main(String[] args) { System.out.println(" "); // Scanner ...
分类:
其他好文 时间:
2020-03-20 22:29:09
阅读次数:
74
package com.company.Util; import java.util.Scanner; public class Test09 { public static void main(String[] args) { System.out.println(" "); // Scanner ...
分类:
其他好文 时间:
2020-03-20 22:23:55
阅读次数:
82
Integer n1 = 123; Integer n2 = 123; Integer n3 = 128; Integer n4 = 128; System.out.println(n1 == n2);// true System.out.println(n3 == n4);// false Sys ...
分类:
其他好文 时间:
2020-03-20 14:24:39
阅读次数:
375
package main import ( "fmt" "github.com/astaxie/beego/toolbox" "time" ) func task() error { fmt.Println(time.Now().Format("2006-01-02 15:04:05")) retu ...
分类:
其他好文 时间:
2020-03-20 10:51:44
阅读次数:
245
创建文件 HelloWorld.java(文件名需与类名一致), 代码如下: public class HelloWorld{ public static void main(String[] args){ System.out.println("hello world!"); } } 运行结果: ...
分类:
编程语言 时间:
2020-03-19 17:51:57
阅读次数:
50
@FunctionalInterface interface LambdaExpress { public int add(); default int div(int a, int b) { System.err.println("lambda default method"); return a ...
分类:
其他好文 时间:
2020-03-19 13:53:54
阅读次数:
55
package kljjjj; public class kljjjjj { public static void main(String[] args) { char a ='A'; System.out.println((char)( a+ 32)); } } ...
分类:
其他好文 时间:
2020-03-19 13:29:14
阅读次数:
39
package mainimport ( "fmt" "strconv" "strings")// 字符串遍历func bL(str string) { fmt.Println(len(str)) // 字节长度 // for range 遍历 for i, ch := range str{ fmt ...
分类:
其他好文 时间:
2020-03-18 23:26:43
阅读次数:
74
思路1: 网上一大把,通过this.getClass().getDeclaredFields();获得所有属性,禁掉访问限制,最终输出属性值 // public String toString2() {// System.out.println("enter sourceObj toString.. ...
分类:
其他好文 时间:
2020-03-17 19:19:28
阅读次数:
64