nconstructor不會被繼承,如果自己沒有寫constructor,compiler時會加入default constructor ,為一個no parameters and throws no exceptions,其存取權限將與class相同。特別注意,若已定義constructor後,compiler就不會再給default constructor。
n在繼承的情況下,如果superclass的constructor有定義Exception in the throws clause,那麼他的subclass也必須定義Exception in the throws clause。