This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
jQuery in Action, 2nd edition
 
subject: a question in fixing this code
 
Similar Threads
a certain bug i cant understand..
a question about super command
how to be a human compiler
a problem with the resolt of the code
a bug with a constructor