Creating and writing to a text file using Java

preview_player
Показать описание
Here is the Java code:

public class WriteFile {

public static void main(String[] args) throws Exception {

Scanner scan;
FileWriter file;
String data, content;
int num;
File myFile;

// Show contents of file created
scan = new Scanner(myFile); // Create a Scanner object from the file object above
{
}
}
}
Рекомендации по теме