fork download
  1. import java.io.*;
  2.  
  3. class Main {
  4. public static void main (String[] args) {
  5. File path = new File("src", "models");
  6. System.out.println(path.getPath());
  7. System.out.println(path.getAbsolutePath());
  8. File novoPath = new File(".", path.getPath());
  9. System.out.println(novoPath.getPath());
  10. System.out.println(novoPath.getAbsolutePath());
  11. }
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/45336/101
Success #stdin #stdout 0.06s 32308KB
stdin
Standard input is empty
stdout
src/models
/home/n5Z85b/src/models
./src/models
/home/n5Z85b/./src/models