zno2

代码块(2)

 

 

The interface SomeInterface cannot define an initializer

初始化块

 site:docs.oracle.com initializer

http://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html

区别:

Instance initializers are blocks of executable code that may be used to help initialize an instance when it is created.

Static initializers are blocks of executable code that may be used to help initialize a class.

 

posted on 2016-08-05 18:31  zno2  阅读(137)  评论(0编辑  收藏  举报

导航