This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Jqplus - File class  RSS feed

Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question ID :958267742300
Which of the following statements regarding are true?
1.You can delete a File or Dir represented by the File Object by just using that object.
2.You cannot create a File Object if a file/dir of that name do not exist.
3.You can create files in any directory using its API
4.Once created there is no way of changing the file/dir the File obj represents.
5.You can traverse between directories.
Correct options 1,3 and 4. I got it right, but feel the options can be rephrased a bit.
For options 1 and 3, both the methods providing the described functionality throw SecurityException if the SecurityManager does not allow the appropriate access to delete/create a file. Perhaps these options can be modified to say something like File class provides for methods to delete or create files or that one can delete/create a file by using a File object provided relevant permissions exist.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!