File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes problem with implementing interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "problem with implementing interface" Watch "problem with implementing interface" New topic

problem with implementing interface

Tarun Kumar Agrawal

Joined: Jun 29, 2011
Posts: 17

On Compiling, i am getting following error:

What's wrong in the code? Thanks in advance..
Piyush Joshi
Ranch Hand

Joined: Jun 10, 2011
Posts: 207

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.

I agree. Here's the link:
subject: problem with implementing interface
It's not a secret anymore!