• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic