I have a vector and it contains the value 5. When i do System.out.Println(vectorVariable), the value outputted is [5]. I want to convert the vectorVariable to string (without the []). I have tried vectorVariable.toString(), which converts it to a string but it still retains the []. So i guess i what i really want is the first element to be returned as a string. How is this possible?
I want to store the value of the vector inside a string without the [].
Try
System.out.println(vector.get(0)). You are trying to print the entire vector, whereas this will only print the selected index, in this case 0.