标题: 关于构造方法的疑惑 [打印本页] 作者: 余志强 时间: 2011-10-2 10:53 标题: 关于构造方法的疑惑 构造器不是没有返回值吗?为什么不能用viod修饰呢?如果她有返回值为什么又没有return呢?这是怎么回事?作者: 匿名 时间: 2011-10-2 12:01
The constructor is an unusual type of method because it has no return value. This is distinctly different from a void return value, in which the method returns nothing but you still have the option to make it return something else. Constructors return nothing and you don’t have an option.