这个问题主要是因为定义类的时候在类名后边加了个括号(); `public class Hello { public static void main(String[] args) { System.out.print("Hello World!"); System.out.println();//换 ...
分类:
其他好文 时间:
2021-04-05 12:26:42
阅读次数:
0
BigDecimal data1 = new BigDecimal("1"); BigDecimal data2 = new BigDecimal("0.01"); if (data1.compareTo(data2) < 0) { System.out.println("第二位数大!"); } i ...
分类:
其他好文 时间:
2021-04-01 13:37:22
阅读次数:
0
package main import ( "fmt" "time" ) func main() { s := NewServices( SetName("peter"), SetTimeout(time.Second*5), ) fmt.Println("name:", s.conf.Name) ...
分类:
其他好文 时间:
2021-03-31 12:16:53
阅读次数:
0
很明显之前学的方式 手动配置还是不够方便。就需要我们去学习Spring的自动装配! #autowire="byName" 定义几个简单类 package Demo; public class Cat { public void shout(){ System.out.println("miao~") ...
分类:
编程语言 时间:
2021-03-29 12:52:06
阅读次数:
0
多态的概述 什么是多态 同一个对象,在不同时刻表现出来的不同形态 多态的前提 1.要有继承或实现关系 2.要有方法的重写 3.要有父类引用指向子类对象 代码演示 class Animal { public void eat() { System.out.println("动物吃饭"); } } cl ...
分类:
编程语言 时间:
2021-03-29 12:34:46
阅读次数:
0
package main import ( "fmt" "github.com/gin-gonic/gin" "net/http" ) func main() { r := gin.Default() m1 := func(c *gin.Context) { fmt.Println("m1 star ...
分类:
其他好文 时间:
2021-03-26 15:28:25
阅读次数:
0
xml配置默认使用类的无参构造 #当类存在有参构造函数时 package Test; public class Hello { private String name; public Hello(){ System.out.println("Hello对象被创建"); } public Hello( ...
分类:
编程语言 时间:
2021-03-26 15:22:42
阅读次数:
0
如果比较两个数值相等的Integer类型的整数,我们可能会发现,用“==”比较(首先你必须明确“==”比较的是地址),有的时候返回true,而有的时候,返回false。比如: Integer i = 128; Integer j = 128; System.out.println(i == j);/ ...
分类:
编程语言 时间:
2021-03-17 14:52:23
阅读次数:
0
public class SimpleExpressDemo02 { public static void main(String[] args) { int a=10,b=6; System.out.println("改变之前的数是:a=" + a + ",b=" + b); a-=b++; // ...
分类:
其他好文 时间:
2021-03-16 11:51:45
阅读次数:
0
public class Test { public static void main(String[] arg0){ String s = "asd....dfa...d.fee.c"; System.out.println(new Test().getReverseStr(s)); } publ ...
分类:
其他好文 时间:
2021-03-15 10:53:11
阅读次数:
0