You are here:

Java/Printoutput stream

Advertisement


Question
"""import java.io.*;
class pstream
{
  public static void main(String args[])
  {
     PrintableOutputStream po;
     FileInputStream fis;
     int x;
     try
     {
        po =new PrintableOutputStream(System.out);
        fis=new FileInputStream("yield.java");
        do
        {
         x=fis.read();
         if(x!=-1)
         po.write(x);
        }while(x!=-1);
     }
     catch(Exception e)
     {}
  }
}""""
Actually i have written code for print output stream for ascii output but i get an error stating that PrintOutputStream "cannot find symbol" can u help me..

Answer
Hi ,

One of two things could have happened.
firstly, you probably have mistyped something..so check your system.out.println to be correct and not typoes in any of your typing..or you can check this article for the second option : http://stackoverflow.com/questions/6777554/cannot-find-symbol-error-even-on-a-ri

cheers

Java

All Answers


Answers by Expert:


Ask Experts

Volunteer


henry joe

Expertise

I can confidently answer questions relating to JSE and JEE6 . Please no questions on JME.

Experience

I am experienced in JSE and JEE6

Education/Credentials
I am a BSEng graduate

©2016 About.com. All rights reserved.