I have declared a new vector called v of type String with an initial capacity of 10 and increasing by 5 each tiem using the following:
Vector<String> v = new Vector<String>(10, 5);
I am then trying to use the add method to add a randome string as follows:
v.add(toString(random.nextInt(5000)));
I am getting the following error;
error: method toString in class Object cannot be applied to given types;
Why can't i do this? I would have thought it would just pass a random number as a String!