About Constructor

This piece of writting are reprinted from the following URL:

http://download.oracle.com/javase/tutorial/java/javaOO/constructors.html 

You don't have to provide any constructors for your class, but you must be careful when doing this. The compiler automatically provides a no-argument, default constructor for any class without constructors. This default constructor will call the no-argument constructor of the superclass. In this situation, the compiler will complain if the superclass doesn't have a no-argument constructor so you must verify that it does. If your class has no explicit superclass, then it has an implicit superclass of Object, which does have a no-argument constructor.

你可能感兴趣的:(object,url,Class,compiler,Constructor)