Overriding a method, semi complicatedly.
So I have an sub-interface that extends a super-interface. In this sub-interface it is required of my assignment to over-ride a method that was given in the super-interface. Now when I implement the sub-interface in a class, the class in eclipse is requiring both methods from the sub and super interface to be in the class. But they are also the same name, "duplicate method" error. So I can't change the name of the super-interface one(which is the one i'd like to as I have overridden it) or comment it out because then it won't be in the class.
When I over-ride in the sub interface I give the method the exact same name and parameters, I just add a custom exception " throws mycustomexception"
*Fixed* - Missing @Override before the overriding method.
Re: Overriding a method, semi complicatedly.
That annotation doesn't actually *do* anything other than make sure that a method is overriding another one. I would bet that you changed something else in the process of adding @Override that actually fixed your problem.
Originally Posted by Tron22