Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-28-2007, 11:02 AM
Member
 
Join Date: Oct 2007
Posts: 1
Feldom is on a distinguished road
I/O exercise
hi there,
Could you help me with this exercise?
Write the static method copyFile(String fromFile,String toFile)
that copys the content of fromFIle to toFile.The fromFIle and toFile are
data of characters.The description of File,FileReader,FileWriter.Reader,
Writer is given.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-28-2007, 05:48 PM
Member
 
Join Date: Aug 2007
Posts: 13
Bojevnik is on a distinguished road
Where exactly do you have problems?
Becuase this exercise seems very "straight-away", you both files one for writing, one for reading then you copy all charackters in a file to another.

You open files by:
Code:
FileReader fr = new FileReader(new File(file1)); FileWriter fw = new FileWriter(new File(file2));
file1 and file2 are String paths to your files.
__________________
I HATE SMURFS!!!!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
exercise of recursive method amexudo New To Java 2 03-09-2008 06:55 PM
Prob with an exercise jhetfield18 New To Java 4 02-15-2008 07:11 PM
Problems with Calendar exercise Jude New To Java 1 11-20-2007 08:30 PM
help with exercise e_as're New To Java 3 09-25-2007 11:14 AM
help with an exercise calcuting tax e_as're New To Java 7 08-01-2007 04:17 AM


All times are GMT +3. The time now is 02:51 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org