public static void main(String[] args) {
File oldName = new File("C:/LC.txt");
File newName = new File("C:/lc.txt");
if(oldName.renameTo(newName)) {
System.out.println("已重命名");
} else {
System.out.println("Error");
}
}
File oldName = new File("C:/LC.txt");
File newName = new File("C:/lc.txt");
if(oldName.renameTo(newName)) {
System.out.println("已重命名");
} else {
System.out.println("Error");
}
}