Why am I getting the error that type Vector does not take parameters for this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why am I getting the error that type Vector does not take parameters for this code?

Please do help me resolve the error: type Vector does not take parameters https://code.sololearn.com/chXpsRG7jv29/?ref=app

6th Apr 2020, 1:32 PM
Merlyn J
1 Answer
+ 2
It's because it's treating as if you were trying to pass arguments to your class Vector{} instead of your Vector<>. Just do a simple renaming of your Class like: public class Vectors{ . . } and it will work. You need to be careful in using reserved words (keywords) to name classes, variables, etc.
6th Apr 2020, 1:39 PM
Jay W