aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Marcus green Exam question-53 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Marcus green Exam question-53" Watch "Marcus green Exam question-53" New topic
Author

Marcus green Exam question-53

anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91
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..
Sudha Kris
Ranch Hand

Joined: Oct 31, 2000
Posts: 46
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
Nijeesh Balan
Ranch Hand

Joined: Oct 09, 2000
Posts: 116
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


Thanks & Regards,<br />Nijeesh.
 
Don't get me started about those stupid light bulbs.
 
subject: Marcus green Exam question-53
 
Similar Threads
Long walk to the printer --- 98%
Compare Mock Exam Scores...
Marcus Green Quiz 1 - Mock Exam Question Doubt
Do You think JQ+ is a must for certification?
Passed