Created
March 3, 2020 00:05
-
-
Save evan-goode/8536ac0b1b03bab0358e43c887e235c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.IOException; | |
class PrintTempDirectory { | |
public static void main(String[] args) { | |
try { | |
String parent = File.createTempFile("temp-file", "tmp").getParent(); | |
System.out.println(parent); | |
} catch (IOException e) { | |
System.out.println(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment