File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes IO doubt? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "IO doubt?" Watch "IO doubt?" New topic
Author

IO doubt?

pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
suppose i have "dir1" which has "file1.txt" and "dir2" which has "file2.txt"
in it.


now say File file=new File(dir1,file2.txt);

what will file.isFile() return
what will file.exists() return

will isFile return true if there is no file of name we are searching for in the particular directory?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14428
    
  23

Read the API documentation, and write a small test program to try it out for yourself to see what happens.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
got it thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IO doubt?