1 | public class Demo { |
===>不是9而是9.0
如果将99.9改成99呢?
1 | public class Demo { |
==>
2.下面程序输出为?1 | public class Demo { |
==>
static{}代码段先于main函数运行,且static{}代码段按顺序执行!
1 | public class Demo { |
==>
static变量为所有对象共有
1 | public class Demo { |
===>不是9而是9.0
如果将99.9改成99呢?
1 | public class Demo { |
==>
2.下面程序输出为?1 | public class Demo { |
==>
static{}代码段先于main函数运行,且static{}代码段按顺序执行!
1 | public class Demo { |
==>
static变量为所有对象共有