I have a string array like string[] sentences which consist of sentences one in each index like This is the first message in sentences[0] and This is the second message in sentences[1] and so on. My java code to send the information to the server for sentiment analysis is like this:
OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
out.write(
"[ " +
"\"Can't wait for the movie\"," +
"\"Countdown! Only ten days remaining!\" " +
"]");
out.flush();
out.close();
How do I replace the texts above in the code by the string array for it's length say n?