This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

whats wrong with my code ?

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matthew Brown wrote:The error message actually gives you a lot of information here.



thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic