Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

absolutepath and canonical path

 
Milind Deodhar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody explain me the correct output the methods
getAbsolutepath and getCanonicalPath will give with a example?
Suppose the file resides in dir c:\java
I am totally confused with this topic.
Milind.
[This message has been edited by Milind Deodhar (edited December 06, 2000).]
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getAbsolutePath and getCanonicalPath are similar. RHE says that getCononicalPath resolves the . and ..
You can run an example with the code below, on my machine, both give the same output.

Bill
 
Vidya Selvaraj
Greenhorn
Posts: 29
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic