Here are some questions 1) what is difference between getPath() and getAbsolutePath() in file handling ? 2) what is difference between Reserve word or Keyword in JAVA and how many keywords are there in java ? 3) where can we get exercises or assignments of different java topics, just for practice ? ------------------ Harjeet Singh Dadwal
Here are some answers: 1) getPath() returns the abstract pathname and getAbsolutePath() returns the full pathname. example. try this to see for yourself:
2) Both Keywords and reserved words cannot be used as identifiers. The difference is keywords have special meaning in the language and reserved don't. There are 46 keywords and 2 reserved words. 3) http://www.javaranch.com/cattledrive.jsp
Good answers above, but I would say that getPath() returns a "relative" path. Here's a mock example from a unix web server: f.getPath() == "images/photo.jpg" f.getAbsolutePath() == "/usr/httpd/images/photo.jpg" The first one shows the path from the current working directory, while the second is the entire path from the root of the hard drive.