Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q44 From Applied reasoning

 
sajida kal
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Regards
Sajida
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic