You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
output.println(mouseX); // Write the coordinate to the file
}
void keyPressed() {
output.flush(); // Writes the remaining data to the file
output.close(); // Finishes the file
exit(); // Stops the program
}
]]></code>
</example>
<description><![CDATA[
Allows characters to print to a text-output stream. A new PrintWriter object is created with the <b>createWriter()</b> function. For the file to be made correctly, it should be flushed and must be closed with its <b>flush()</b> and <b>close()</b> methods (see above example).
]]></description>
<syntax></syntax>
<method>
<mname>print()</mname>
<mdescription>Adds data to the stream</mdescription>
</method>
<method>
<mname>println()</mname>
<mdescription>Adds data to the stream and starts a new line</mdescription>