Sometimes when I try to override a method, I get the signature wrong. The program still compiles, but the code never runs. How can I make sure my method actually overrides the method of the superclass?

John Zukowski

The @Override annotation can be added to the javadoc for the new method. If you accidently miss an argument or capitalize the method name wrong, the compiler will generate a compile-time error.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact