~/ learn/ comp-308/ cards/ File, Path & the filesystem
1 of 3

A relative path resolved against the working directory

A relative path resolved against the working directory

Answer

File out = new File("dump.out"); if (out.exists()) System.out.println(out.getAbsolutePath());

A relative File names dump.out in the current working directory; getAbsolutePath() resolves it. No machine-specific path is baked in.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/96c52b3f-6ceb-4c51-8d75-96ab8087d04e/flashcard utf-8 LF