asp.net网站开发基础,做一个属于自己的网站,青岛建韩国网站的公司,已经有了域名怎么做网站A#xff1a;构造函数没有返回值#xff0c;也不能用void修饰。如果不小心给构造函数前面添加了返回值类型#xff0c;那么这将使这个构造函数变成一个普通的方法#xff0c;在运行时将产生找不到构造方法的错误。C#xff1a;super(参数)#xff1a;调用父类中的某一个构…A构造函数没有返回值也不能用void修饰。如果不小心给构造函数前面添加了返回值类型那么这将使这个构造函数变成一个普通的方法在运行时将产生找不到构造方法的错误。Csuper(参数)调用父类中的某一个构造函数(应该为构造函数中的第一条语句)。 this(参数)调用本类中另一种形式的构造函数(应该为构造函数中的第一条语句)。D可以调用。class Person {public static void prt(String s) {System.out.println(s);}// 父类·无参数构造方法 A Person.Person() { //构造方法(1)prt(父类·无参数构造方法 A Person.);}// 父类·含一个参数的构造方法 A persons name is codersaiPerson(String name) { //构造方法(2)prt(父类·含一个参数的构造方法 A persons name is name);}}public class Chinese extends Person {Chinese() {super(); // 调用父类构造方法(1)// 子类·调用父类“无参数构造方法” A chinese coder.prt(子类·调用父类”无参数构造方法“ A chinese coder.);}// 子类·调用父类”含一个参数的构造方法“ his name is codersaiChinese(String name) {super(name);// 调用父类具有相同形参的构造方法(2)prt(子类·调用父类”含一个参数的构造方法“ his name is name);}// 子类调用子类具有相同形参的构造方法his age is 18Chinese(String name, int age) {this(name);// 调用具有相同形参的构造方法(3)prt(子类调用子类具有相同形参的构造方法his age is age);}public static void main(String[] args) {Chinese cn new Chinese();cn new Chinese(codersai);cn new Chinese(codersai, 18);}}