package utilities; public class TempDir { private String dirName; public TempDir() { dirName = System.getProperty("java.io.tmpdir"); } public String getDirName() { return dirName; } public static void main(String[] args) { TempDir tempDir = new TempDir(); System.out.println(tempDir.getDirName()); } }