Nehmen wir an, ich möchte ein Textdokument bearbeiten, folgender Dateipfad: C:/Ordner/Textdokument.txt. Wie gebe ich den Pfad im Konstruktor von RandomAccessFile an, damit keine FileNotFoundException entsteht?
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
RandomAccessFile randomAccessFile = new RandomAccessFile("C:/Test/text.txt", "r");
System.out.println(randomAccessFile);
randomAccessFile = new RandomAccessFile("C:\\Test\\text.txt", "r");
System.out.println(randomAccessFile);