March 2019
Intermediate to advanced
242 pages
6h 21m
English
The file paths on Windows OS use a backslash to separate the directories and their subdirectories. For instance, C:\Mala\eJavaGuru refers to the eJavaGuru subdirectory in the Mala directory in the C: drive. Here's how you can store this path by using a traditional string literal:
String filePath = "C:\\Mala\\eJavaGuru\\ocp11.txt";
With raw string literals, you can store the same file path as follows (changes are highlighted in bold):
String rawFilePath = `C:\Mala\eJavaGuru\ocp11.txt`;
Read now
Unlock full access