Get Path from File

File temp = File.createTempFile("i-am-a-temp-file", ".tmp" ); // as we use a temp file for demo, let jvm delete it temp.deleteOnExit(); System.out.println("File path : " + temp.getAbsolutePath()); System.out.println("File path : " + temp.getParentFile().getAbsolutePath());

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.