Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javacaps-mock Q

 
Mukti Bajaj
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
35. The File class is concerned select all the correct answers?

A) A File class can be used to create files and directories
B) A File class has a method mkdir() to create directories
C) A File class has a method mkdirs() to create directory and its parent direcoties.
D) A File cannot be used to create directories.

Answer given:B,C
Answer's according to me :A,B,C
As file class has method....createNewFile() which creates a new empty file.And mkdir() method creates new directory as per the path specfied by current File object.
Please, suggest.
Thanks.
Mukti
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you on this one. File class has methods to create a file, create a single directory (mkdir()) or create multiple directories (mkdirs()).
Bill
 
Konda Balabbigari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
Here is the correction for this post http://www.javacaps.com/scjp_mockexams2.html#q18
Thanks
Konda Balabbigari
 
Lori Battey
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.javacaps.com/scjp_mockexams2.html#q35
an updated link to the updated question... :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic