+ 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 ответ
+ 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