//Sample02_02.java import java.io.File; import java.io.IOException; class Sample02_02{ public static void main(String[] args){ File file = new File("dir01\\pathname.txt"); String strPath = file.getPath(); System.out.println(strPath); try{ file.createNewFile(); }catch(IOException e){ System.out.println(e); } } }