Results 1 to 1 of 1
-
How to check whether file is exists or not
This example code checks whether the given file is exist or not.
Java Code:import java.io.*; public class FileTest { public static void main(String args[]) { File f = new File("c:\\MyFile.txt"); System.out.println (f + (f.exists()? " is found " : " is missing ")); } }
Similar Threads
-
File fp = new File(filePath);fp.exists() does not yeild proper result
By ganeshp in forum Advanced JavaReplies: 2Last Post: 04-07-2009, 06:25 AM -
Check if a web page exists or not
By Java Tip in forum Java TipReplies: 0Last Post: 03-02-2008, 07:24 PM -
Can someone check my code
By joz_12345 in forum Java 2DReplies: 7Last Post: 02-18-2008, 02:58 AM -
How an array can check that profile whether exists or not???
By hien_NU in forum New To JavaReplies: 1Last Post: 01-10-2008, 01:18 AM -
spell check
By kazitula in forum Java AppletsReplies: 2Last Post: 12-20-2007, 11:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks