I am storing some simple strings to a vector, and I want to print each value on a new line and I am not sure how to do that. I am also wondering if it’s possible to remove the brackets and the commas java puts in after it prints the vector? I know I need a toString() method, i am not sure how to write it.
Here is what it does now:
[Bob: Hello World, Bob: How are you?, Bob: I'm Good]
If possible I would like it to print :
Bob: Hello
Bob: How are you?
Bob: I'm Good
1 Answer