Results 1 to 4 of 4
Thread: File handling
- 03-22-2011, 11:14 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 61
- Rep Power
- 0
File handling
package first;
import java.io.File;
import java.io.IOException;
public class Mgr
{
public static void main(String[] args)}
{
File file1 = new File("hello.html");}
try
{
System.out.println(file1.createNewFile());}
catch (IOException e)
{
e.printStackTrace();}
Hi,
has i am very new to the topic FILE-HANDLING
when i run the above program for the 1st time i got output true..........,but when i run the program for the second time i got the output false
i know y i got false for the 2nd time................................!!!!!!!!!!!!
my doubt is that "where the newly created file is stored."
Thanks & regards
Daya
- 03-22-2011, 11:17 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
You can figure this out with the following line
Java Code:System.out.println(file1.getAbsolutePath());
- 03-22-2011, 11:32 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 61
- Rep Power
- 0
- 03-22-2011, 04:20 PM #4
Senior Member
- Join Date
- Jan 2011
- Location
- Bangalore, India
- Posts
- 102
- Rep Power
- 0
Similar Threads
-
File handling
By Claude2005 in forum New To JavaReplies: 17Last Post: 09-21-2010, 11:49 AM -
Java/OS File Handling
By Revenna in forum New To JavaReplies: 3Last Post: 05-04-2010, 10:08 AM -
Regarding File Handling
By ravjot28 in forum New To JavaReplies: 1Last Post: 01-20-2010, 09:15 PM -
file handling problem
By gcampton in forum EclipseReplies: 19Last Post: 01-05-2010, 01:18 PM -
handling WAV file
By zellazode in forum New To JavaReplies: 1Last Post: 09-08-2009, 03:46 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks