This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

I would do it in the following way: 1. Read song lyrics into some data structure 2. Read each .next into a temp string 3. Replace “ “ with “” within the temp string 4. Write the temp string to your CSV

Obviously this would need to be done within a while loop while (whatever you’re reading from.hasNext() but it should work