Examveda
Examveda

In Java, how can you check if a file or directory exists using the `File` class?

A. By using the `createNewFile()` method

B. By using the `read()` method

C. By using the `exists()` method

D. By using the `write()` method

Answer: Option C


This Question Belongs to Java Program >> Input Output

Join The Discussion

Related Questions on Input Output