This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes File Creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "File Creation" Watch "File Creation" New topic
Author

File Creation

Aggarwal Arpit
Ranch Hand

Joined: Mar 04, 2012
Posts: 86
File junitOutputDir = new File("logs/", "junit.output");

Can anybody explain what this code is doing?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10175
    
    8

Did you read the File API?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Zeeshan Sheikh
Ranch Hand

Joined: Nov 20, 2011
Posts: 144

Package: java.io;

A detail explanation of File class.

The Path class is an upgraded version of the well-known java.io.File class.

Answer to your Question: You are making a new instance of class file. Once you have the File object then you can work on your file.


MySQL Blog
http://mysqlearner.blogspot.com/
 
 
subject: File Creation
 
Similar Threads
WA #1.....word association
java io
Creating a file by giving relative path
performance issues with file read and write
Struts FormFile (parsing .csv files)