This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
As you see, the first two methods return me the absolutePath and canonicalPath, but the absolutePath is actually "C:\Workspace\LearnJava\src\resources\sample.properties" , "src" is missing in the output.
But the real question is, when getAbsolutePath() returns me an output, whether correct or not, why the other methods returning me false. If exists() is returning false, that means it could not find the file, but then it should not return the absolutePath() also.
If I change the resource folder to the LearnJava folder level instead of src level, then the output is