摘要:
Java初始化顺序普通类初始化 1 package com.fwj.init; 2 3 public class Sample { 4 5 Sample(String s){ 6 System.out.println(s); 7 } 8 Sample(){ 9 System.out.println("Sample默认构造函数被调用");10 }11 } 1 package com.fwj.init; 2 3 public class Test { 4 static Sample sam=new Sample(... 阅读全文