I was wondering if it is possible to create multiple files with similar names, without overwriting the current file.
for example: if I have a file: xyz.txt next tim
Not in java as already indicated by @Greg Kopff. But you can work around something like this:
@Greg Kopff
int count = 0; public void createFile(String name) throws IOException { File f; f = new File(name); if (!f.exists()) { f.createNewFile(); } else { count++; createFile(name + (count)); } }