Java: Writing out message to file

void writeMessage( String message, File file )

I’m looking to write out a specified string message to a file using the above syntax. How do I do this?

Have you tried researching this on your own yet?

If you literally enter your subject line into Google, you will get many great articles on the subject.

Yes, although I’m very new to Java and can’t make perfect sense of what I’m seeing. I can’t find examples with the exact syntax and I’m seeing a lot of “BufferedWriter” and try/catch statements. These are probably relevant but I’m not certain. I’m quite clueless right now as you can probably tell.

We have no idea what level of Java you already know. We are a teaching site vs. a StackOverflow type site. We can refer you to resources to read and then you can attempt to use those resources. If you try to implement something with actual code and run into a problem, then you can post the code tried and explain what you are expecting the code to do vs. what actually happens (i.e. error messages or wrong result) in detail and then we can try to guide you to a solution.