///这样为何不对?
File file = new File("E:\\Music\\mp3\\Melody.MP3"); // Destination directory
File dir = new File("E:\\Music"); // Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
if (!success) {
System.out.println("File was not successfully moved");
}
File file = new File("E:\\Music\\mp3\\Melody.MP3"); // Destination directory
File dir = new File("E:\\Music"); // Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
if (!success) {
System.out.println("File was not successfully moved");
}
解决方案 »
- String简单问题
- 用内部类测试多态性时“son s = new TestD();s.fun(454);”这里不应该调用的是子类中的fun()方法吗?帮帮忙!
- 在学Timer,一个简单问题,请告诉小弟,谢谢
- 关于子类对象创建时,父类也创建了对象么
- A:JAVA:1:类InitialORDERtEST是公共的,应在INITIALORDERTEST。JAVA的文件中声明 QQ 466825413 [email protected]
- 有关java包的问题,高手请进!
- 请问java程序如何混编。
- String字符串形式的数学运算如何得到结果?
- 关于weblogic
- 哪位大虾对WebPhone有所了解?
- InputStream接收byte数据问题,请高手指教。
- 静态变量如何判断相等?
是否先判断是否exist,如果是先delete,然后copy?