Article View: aus.computers.java
Article #449Re: Help urgent !!!writing to file
From: DavidL
Date: Mon, 16 Oct 2000 00:00
Date: Mon, 16 Oct 2000 00:00
39 lines
1853 bytes
1853 bytes
What is this "Text" class ?
I can't find it in my reference.
I would suggest creating your output file like this:
PrintWriter fout = new PrintWriter (new FileOutputStream
("customer.out"));
Good luck
DavidL
"dennis" <dennisc@iprimus.com.au> wrote in message
news:39eaf0e7@news.iprimus.com.au...
> Hello all
> I have created a list which ends up with some names and scores beside
them.
> When the application is closed I want to write the data in the list to
file.
> I thought I could do it like this.
>
> else if (arg.equals("End")){ // if it was End
> PrintWriter fout = Text.create("customer.out");
> System.out.println("printing to file");
> fout.println(Merits);
> fout.close();
> System.exit(0); // We exit
>
> The name of the list is Merits. I have imported java.io.*. When I compile
> with this code I get the error
> Undefined variable or class name: Text
>
> Can anybody tell me what I am doing wrong. Many thanks
>
> Dennis
> }
>
>
>
>
Technical Details
Message-ID:
<39eb6f64$1@server.local>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39eaf0e7@news.iprimus.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,982d9b52a8d5dfdc,start X-Google-Attributes: gid10d6db,public From: "DavidL" <email.address@in.message> Subject: Re: Help urgent !!!writing to file Date: 2000/10/16 Message-ID: <39eb6f64$1@server.local> X-Deja-AN: 682216308 References: <39eaf0e7@news.iprimus.com.au> X-Original-NNTP-Posting-Host: 192.168.0.5 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 971731188 144.132.179.174 (Tue, 17 Oct 2000 08:19:48 EST) X-Authenticated-User: davidl Organization: BigPond Internet Services (http://www.bigpond.net.au) X-Original-Trace: 17 Oct 2000 08:13:08 +1100, 192.168.0.5 X-MSMail-Priority: Normal NNTP-Posting-Date: Tue, 17 Oct 2000 08:19:48 EST Newsgroups: aus.computers.java