You can easily write to files using the stuff in the java.io package.
Plus there are many other ways to do this. The best way depends on what you're doing. Often the easiest thing is to serialize data as XML or as java.util.Properties files.
thx for information
what i m doing.i have claculator and i need to store each session (so if i add (2+3=5)) i need to store in a file.and rename the file.
there in the address u gave me i can fins something like this yes..?
The link to the tutorial will show you ways to do I/O, including writing to files.
Writing the "session" to a file will depend on what exactly you mean by a "session". What is in a session? What are the relationships between elements in a session? Are you going to want to load this session later into a new object?
like the main imporatnt thing to do is to save each calculation element.in a separate file.
if u have any example just to see it.some codes.or where can i find.
like u have program and u need to save some thing in a text file.