Forums Register Login

Write a Program for Beginners

+Pie Number of slices to send: Send
It is recommended that you not see other answers and try it out yourself.
Write a program using only the File class that creates a file on the hard disk. Do not use any of the stream classes or Writer classes. what happens when you try the code below.

Have fun trying..
------------------
Regds.
Rahul P. Mahindrakar

[This message has been edited by Rahul Mahindrakar (edited August 30, 2000).]
+Pie Number of slices to send: Send
I created this thread so that one could know that creating an Object of File does not create a physical file on the hard disk. This can be done only by invoking the method createNewFile() of File class.
Thus after the code below is executed a file by the name "New" exists on the Hard disk in the same directory in which the program was run.

------------------
Regds.
Rahul P. Mahindrakar
+Pie Number of slices to send: Send
Can u discuss sth more on File class?
+Pie Number of slices to send: Send
Thanx Rahul,
now I'll never forget this concept.
hope u'll keep on giving pearls of knowledge.
thanx again.
regards
deekasha

+Pie Number of slices to send: Send
Thanks Rahul.
I've already used this one in the Programming Certification forum.
Keep them coming.
Thanks
Sandeep
brevity is the soul of wit - shakepeare. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 847 times.
Similar Threads
A simple sample of FileStreams
choose between 2 run methods
Daemon Threads
A question for beginners
How to Run Client in WebSphere3.5
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:56:59.