Java Program – to check whether a new file is created or already exists.

Output:

A new file will be created in the same directory.