• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Marcus green Exam question-53

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The question no of marcus green exam no 53...says that File class can be used to delete the File from the directory ...is that possible..If yes can anyone lemme know the syntax of it...I am giving the exam in third week of november....pretty nervous..Becoz of threads...can someone out there help me out with threads example...i need a small working example displaying the use of synchronized,wait,notify all....i would be glad to..I have tried understanding the concepts and have done so to some extent but need some practical example...thanks..
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
File class has a method called delete. It deletes whatever file name you associate it with. If you give a directory name, then it will delete the directory if it's empty.
Usage is
File f = new File("test.txt");
f.delete();
This deletes the file in the working directory.
If you give a directory name for f, like
f = new File("\test");
It will delete the directory test if it's empty.
Sudha
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi anand,
For simple examples on synchronised, wait, notify etc., I think u can refer to the book " The complete reference of Java 2" by Herbert Schieldt.
Thanks
Nijeesh
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic