File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a question in fixing this code

 
alex lotel
Ranch Hand
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic