file f = new file("c:\\temp\\example.txt"); f.createnewfile();
on executing new file named "example.txt" created in temp folder. question how provide file path in max osx.. tried providing
file f = new file("\\users\\pavankumar\\desktop\\testing\\java.txt"); f.createnewfile();
but didn't worked me. in advance...
forward slash "/" must used file path here. use:
file f = new file("/users/pavankumar/desktop/testing/java.txt"); f.createnewfile();
Comments
Post a Comment