filmov
tv
[ Java Programming ] Reading and Writing text files tutorial

Показать описание
I hope you were able to make use of this video. Included below is the source code that was utilized in this project.
package javaio;
/**
*
* @author Code Splosion :)
*
*/
public class FileInputOutput {
public static void main(String[] args) {
String stringOfInfo = "Hello World. Today's date is 04 April, 2018";
String result = "";
try {
} catch (FileNotFoundException exceptio) {
}
}
private static String readData(String fileName) throws FileNotFoundException {
File fileObj = new File(fileName);
Scanner scanner = new Scanner(fileObj);
String result = "";
}
return result;
}
private static void writeFile(String stringOfInfo, String fileName) throws FileNotFoundException {
File fileObj = new File(fileName);
PrintWriter pw = new PrintWriter(fileObj);
}
}
package javaio;
/**
*
* @author Code Splosion :)
*
*/
public class FileInputOutput {
public static void main(String[] args) {
String stringOfInfo = "Hello World. Today's date is 04 April, 2018";
String result = "";
try {
} catch (FileNotFoundException exceptio) {
}
}
private static String readData(String fileName) throws FileNotFoundException {
File fileObj = new File(fileName);
Scanner scanner = new Scanner(fileObj);
String result = "";
}
return result;
}
private static void writeFile(String stringOfInfo, String fileName) throws FileNotFoundException {
File fileObj = new File(fileName);
PrintWriter pw = new PrintWriter(fileObj);
}
}