格式:[修饰符] 类名([形参列表]){//...}
public static void main(String[] args) { Testc testc = new Testc(); System.out.println("//"); } /** * 构造器不能声明返回值,甚至连void都不能写 */ public Testc(){ System.out.println("leiming"); }
格式:[修饰符] 类名([形参列表]){//...}
public static void main(String[] args) { Testc testc = new Testc(); System.out.println("//"); } /** * 构造器不能声明返回值,甚至连void都不能写 */ public Testc(){ System.out.println("leiming"); }