Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Overwriting File Info
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Selfi




PostPosted: Mon Jan 24, 2005 12:55 am   Post subject: Overwriting File Info

Hi everyone, I'm trying to figure out how to remove lines of information from files.

For example, the file contents is

a
b
c
d
e
f
g

and i want to remove the line containing the letter d
how would one go about this without creating a blank line in the file?
thanks a bunch in advance.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Mon Jan 24, 2005 4:47 pm   Post subject: (No subject)

Can you read the lines from the file into an array of Strings?

Can you loop over that array?

Can you print each String in that array to a file?
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: