Randhir Negi

Greenhorn
+ Follow
since Feb 18, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Randhir Negi

These Bombay people seem to on to a good thing. We Delhi people too need to cooperate yaar!!.Remember together we CAN , and we WILL clear the exams.
I am planning to give the exam on March 4. All advice is welcome. Thankx in advance.
After creating the file object in memory , to create the file object in the actual file system you have to create it using the create or createfile method( I forget the exact method name.....)of the file class. Then only would the actual file or dir. come into existance.The creation of the file object in memory does not automatically lead to creation of the actual file on the hard disk.
try this ....
import java.io.*;
public class rat
{
public static void main(String args[])
{
File f = new File("A:book/chapter1");
f.createFile(); // or f.create();
if(f.exists())
System.out.println("true");
if(f.isDirectory())
System.out.println("true");
f.getName();
}
}