From a first look at your questions, a lot of titles seem on the short end.
Let's take for instance
Trouble with filewriter in java
which makes me wonder what trouble you are having with a FileWriter in Java.
Continuing in the question, I read the first line
OK, I'm having some trouble writing multiple lines to a text file.
which could have almost been the title:
When I write multiple lines to a file, why does the file only contain the last line?
This invites me much more to answer your question than "trouble with ..." does. Then I don't need to go through 6 lines and 2 code blocks that try to explain what the question title should.
After that, I'm left with a huge amount of code. The file comment, imports, input, console output and most of the logic are irrelevant there. So, to help people to answer your question it would help to only paste the relevant parts such that they don't have to go through a lot of code. This shows that the code is yours and that you understand which part is relevant, which turns it from a "code reading" problem into a "what am I doing wrong?" problem.
Hence, this is why you received a comment:
Just a warning, but this is dangerously close to a "what's the code" question.
Bottom line of the story here is that you should try to avoid downvotes in the future by putting a bit more effort in the question such that it is more readable to your users:
Make sure there is a good introduction that makes the actual problem clear
The title will interest users into answering your question, it should summarize the problem.
The first (and often also last) paragraph should attempt to make the problem clear.
Avoid the following sentences, as they don't make your problem more clear for people that not yet understand the problem but rather just fill the post:
Who knows how to fix this problem? Rhetorical question, answers will tell.
Any help is greatly appreciated. We know you need help.
Things I need some help with: We know you need help.
This may be asked here before, ... This indicates you didn't search.
Try to add more details explaining what you have already tried and what you already know.
Make sure the detail don't contain too much totally irrelevant information.