Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Write a Program for Beginners

 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can u discuss sth more on File class?
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Rahul,
now I'll never forget this concept.
hope u'll keep on giving pearls of knowledge.
thanx again.
regards
deekasha

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rahul.
I've already used this one in the Programming Certification forum.
Keep them coming.
Thanks
Sandeep
 
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic