Section 8.7: file-type file. With this test, there is no response, no file, and all tests are false.
Public class testfileclass {
Public static void main (string [] ARGs ){
Java. Io. File file1 = new java. Io. File ("image/us.gif ");
System. Out. println ("does it exist? "+ File1.exists ());
System. Out. println ("Can it be read? "+ File1.canread ());
System. Out. println ("Can it be writter? "+ File1.canwrite ());
System. Out. println ("Is it a directory? "+ File1.isdirectory ());
System. Out. println ("Is it a file? "+ File1.isfile ());
System. Out. println ("Is it a absolute? "+ File1.isabsolute ());
System. Out. println ("is it hidden? "+ File1.ishidden ());
System. Out. println ("absolute path is" + file1.getabsolutepath ());
System. Out. println ("Last modified on" + new java. util. Date (file1.lastmodified ()));
}
}
If you want to get away from eclipse, you cannot go out and use cmd. You can change the JDK configuration or something. Chaos, chaos, none of them will come out, crazy, hot, sweaty, stuffy