In my application, I need to record video. Before start of recording in I\'m assigning a name and directory to it. After recording is finished user has ability to rename his
Working example...
File oldFile = new File("your old file name"); File latestname = new File("your new file name"); boolean success = oldFile .renameTo(latestname ); if(success) System.out.println("file is renamed..");