aspose file tools*
The moose likes Java in General and the fly likes whats wrong with my code ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "whats wrong with my code ?" Watch "whats wrong with my code ?" New topic
Author

whats wrong with my code ?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692







The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4464
    
    8

The error message actually gives you a lot of information here.

Square is not abstract and does not override abstract method area(int,int,int) in Shape


That's the reason, right there. Square is not an abstract class. Therefore it must provide an implementation of all methods in interfaces it implements. You either have to implement area(int, int, int), or you need to mark Square as abstract - which means you're expecting subclasses to implement it.
naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

Matthew Brown wrote:The error message actually gives you a lot of information here.



thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: whats wrong with my code ?