实时演示
public class Tester { public int a; { a = 10; } public static void main(String[] args) { System.out.println(new Tester().a); } }It will print the value of an as 10.
以上就是为什么在Java中使用实例初始化块?的详细内容,更多请关注php中文网其它相关文章!
已抢65124个
抢已抢28590个
抢已抢15452个
抢已抢7752个
抢已抢9654个
抢已抢19647个
抢