The Artima Developer Community
Sponsored Link

Java Answers Forum
create a streamwriter

1 reply on 1 page. Most recent reply: Apr 28, 2003 7:37 AM by Jaycee

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Uma

Posts: 4
Nickname: uma2003
Registered: Apr, 2003

create a streamwriter Posted: Apr 27, 2003 11:26 PM
Reply to this message Reply
Advertisement
Hi all,

I am writing a code which has to write a a vector in a stream . For this purpose I am creating a streamwriter and writing the vector into it. I below give the coding and the error I get.

class StreamWriter
{
void handlestream(String[] str,Vector t)
{
Vector temp = new Vector();

for(int i=0;i<=t.size();i++)
{
temp.addElement(t.elementAt(i));
System.out.println(temp);
}
StreamWriter newstream = new StreamWriter();
newstream.write("Hello");
}
}

pakstream\StreamWriter.java:22: cannot resolve symb
symbol : method write (java.lang.String)
location: class pakstream.StreamWriter
newstream.write("Hello");
^
1 error


Pls anyone say me what is the error. Thanz.

Uma


Jaycee

Posts: 26
Nickname: jaycee
Registered: Apr, 2003

Re: create a streamwriter Posted: Apr 28, 2003 7:37 AM
Reply to this message Reply
Your class, "StreamWriter", has not "write(String s)" method.

Flat View: This topic has 1 reply on 1 page
Topic: Amicable Numbers program Previous Topic   Next Topic Topic: volatile keeps on escaping to me..

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use