The overriding method has the same name, number and type of arguments, and return value as the method it overrides. (In fact the return type of a subclass can be a subclass of the return type of its superclass.
An instance method in a subclass with the same signature and [B]return type[B] as an instance method in the superclass overrides the superclass's method
Joanne
In fact the return type of a subclass can be a subclass of the return type of its superclass.
Joanne
SCJP, SCWCD
Are you sure that the compiler is not interpreting Vector as being java.util.Vector - a standard Java class
Generally, giving classes names of existing SDK classes is a bad idea
That being said, if your Vector extends Matrix, then it is of the type Matrixa nd can be used in any method which takes a Matrix (or a Vector). Can you show us the code that is causing the error?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
If you are using JDK 5.0.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |