Example
import java.io.File;
class CheckRead
{
public static void main(String args[])
{
// Create a File object
File f=new File("CheckRead.java");
// Check can be Read
System.out.println("Can file be read (T/F)? "+f.canRead());
}
}
Output
Can file be read (T/F)? true
No comments:
Post a Comment