Creating a file that already exists

Report a typo

What is the result of the program below if the file dir/file.txt exists and has some content?

File file = new File("dir/file.txt");
if (file.createNewFile()) {
    System.out.println("File is created");
} else {
    System.out.println("File is not created");
}
Select one option from the list
___

Create a free account to access the full topic