You can use the UserInfo class to save something in an uploaded scenario. When using it, it will automatically create a '.csv' file which can save a score int, ten other ints and five strings per user.
If shared locally (within the confines of your local network), it is possible to use a '.txt' file. However, because of security issues, you will not be able to accomplish that when shared on a website (file writing restrictions).
You can't write to directories on this web server (it would be a huge security issue if you could). Even if you could, a "File" object in Java refers to the local file system, so you couldn't use a FileOutputStream (for example) to do so.
Then we are talking about different things. Maybe you don't understand how scenarios run. They are implemented as Java applets and when you view them they are downloaded and run locally on your machine (with limited permissions) by the Java plugin. They do not run on the server. If they could create a file it would exist only on the users' own machine (but they can't, because applets don't have permission to write to files on the users machine).
Ah ok perfect thank u much understood it. U can have a look at my Scenario so u can see what i wanted to do it for. But now you need to download it to work fine.