[ Java Programming ] Reading and Writing text files tutorial

preview_player
Показать описание
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);



}
}
Рекомендации по теме
join shbcf.ru