Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with implementing interface

 
Tarun Kumar Agrawal
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImportJava.java:




Test.java:



On Compiling, i am getting following error:



What's wrong in the code? Thanks in advance..
 
Piyush Joshi
Ranch Hand
Posts: 207
Eclipse IDE Firefox Browser jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you read the error description, it clearly states that you are trying to assign weaker access privileges to methods while implementing them.

by default methods declared in interfaces have public access, when you implement an interface method it must be declared public.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic