[求助]请教一个File类的程序!!
为什么目录“2”删不了??import java.io.*;
class lianxi
{
public static void main(String []args) throws Exception
{
File x=new File("2");
x.mkdir();
File y=new File("2"+File.separator+"2.txt");
y.createNewFile();
y.deleteOnExit();
x.deleteOnExit();
Thread.sleep(3000);
}
}