aspose file tools*
The moose likes Beginning Java and the fly likes a question in fixing this code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "a question in fixing this code" Watch "a question in fixing this code" New topic
Author

a question in fixing this code

alex lotel
Ranch Hand

Joined: Feb 01, 2008
Posts: 191
i noticed that A doesnt implement C
it doesnt have print method
i tried to fix it by adding

public class A extends B implements C

but it ssays that there is a bug in the superconstructor
i cant understand what is the bug??

alex lotel
Ranch Hand

Joined: Feb 01, 2008
Posts: 191
i was told that another way is to write abstract on class A

but i cant understand it meening

because abstract is just an interface with the possibility
of including a finish method not just the signatures like
interface

??
S Reddy
Ranch Hand

Joined: May 17, 2007
Posts: 45
If you are implementing an interface, you should define body for every method in the interface. If you don't want want to do it in the class 'A', declare it as abstract, so that 'A' don't need to implement it but any subclass of 'A' should implement it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a question in fixing this code