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 Murach's Java Servlets and JSP this week in the Servlets 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: 14074
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
pras
Ranch Hand

Joined: Apr 04, 2007
Posts: 188
got it thanks
 
Don't get me started about those stupid light bulbs.
 
subject: IO doubt?
 
Similar Threads
I/O K&B Question
File.Separator
Having problem with question 12
I/O Question.
Chapter 6 from K&B question 12