Ok this is a homework questions, but I cannot find the answer anywhere, not even in the book.
Path to Files If the user wants to specify a path for a file, the typical forward slash is replaced by ________.
can you help?
Ok this is a homework questions, but I cannot find the answer anywhere, not even in the book.
Path to Files If the user wants to specify a path for a file, the typical forward slash is replaced by ________.
can you help?
Try using double back-slashes. (\\)
However, the more portable solution is to use File.separator, as described here.
This depends on the platform - on windows, it'll be replaced by 'c:\', on Unix it'll be left as '/'