Here you can find the source of reName(String oldName, String newName)
public static void reName(String oldName, String newName)
//package com.java2s; import java.io.File; public class Main { public static void reName(String oldName, String newName) { File oldF = new File(oldName); File newF = new File(newName); boolean renameTo = oldF.renameTo(newF); if (!renameTo) { return; }/* ww w. j ava 2 s. co m*/ } }