The question you're asking doesn't have anything to do with the SCJP exam directly. Yesterday you also asked some questions which were not about SCJP in the SCJP forum. The "Java in General (Beginner)" forum is more appropriate for questions like yours. I'll move this question to that forum for you.
Please post in the SCJP forum only if your question is about the SCJP.
About your question: Lookup the documentation of the java.io.File class in the API documentation. You'll have to learn how to use that documentation; you'll need it frequently if you're programming in Java.