File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes Q44 From Applied reasoning Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Q44 From Applied reasoning" Watch "Q44 From Applied reasoning" New topic

Q44 From Applied reasoning

sajida kal
Ranch Hand

Joined: Mar 22, 2001
Posts: 89
Which of the following statements about Files are true?
One of the options is "A new file object can be created by invoking createNewFile method".
I didn't select the above option as I felt that a new file
can be created in the filesystem by using the createNewFile method. Since the word 'object' was used in the option, I felt it was not the right option, but it is a valid answer according to the author.
Kindly give your comments.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Sajida,
I think your right and the question was poorly worded. The <code>File.createNewFile()</code> method returns a boolean not an Object.

Jane Griscti
Sun Certified Programmer for the Java� 2 Platform

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
subject: Q44 From Applied reasoning
jQuery in Action, 3rd edition