wood burning stoves 2.0*
The moose likes Java in General and the fly likes string manipulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "string manipulation" Watch "string manipulation" New topic
Author

string manipulation

pvsr rao
Ranch Hand

Joined: Oct 05, 2005
Posts: 102
i have one string.i have to create a one file and copy the string into that file.how to do this.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
This sounds like file manipulation, not String manipulation. To create a file and write to it, you should use either FileOutputStream or FileWriter. See the link to the Java tutorial in my signature for some information about these and other input and output stream classes.

Layne


Java API Documentation
The Java Tutorial
Akshay Kiran
Ranch Hand

Joined: Aug 18, 2005
Posts: 220
to write something on file is called serialization
(your topic could have been "writing a string on file" rather than "string manipulation")
to read/write from files, you need to first import the
java.io package
and then use the classes to open the desired file and write the string at hand onto it.
I think you are new to I/O and I suggest you do a bit of reading before asking for a solution directly. Try searching the I/O forum and make a beginning with the java tutorial.

happy programming


"It's not enough that we do our best; sometimes we have to do<br />what's required."<br /> <br />-- Sir Winston Churchill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: string manipulation
 
Similar Threads
String
Any one have question related to String Manupulation please post here !! Thanks
Big Java Strings
what is string pool?
java.lang.ClassCastException: java.lang.String cannot be cast to mycom.lang.MyString