Thread: explain java p for me!

  1. #1
    Unregistered
    Guest

    explain java p for me!

    import java.io.*;
    public class inputApp
    {
    public static void main(String args[])
    {
    system.out.println("....");
    try{
    InputStream MyInputStream=new FileInputStream("test.java");

    string str="";
    int inp=0;
    while(inp!=-1)
    {
    inp=MyInputStream.read();
    str+=(char)inp;
    }
    MyInputStream.close();
    System.out.Println(str);
    }
    catch(FileNotFoundException e){
    System.out.Println("File not found");
    }
    catch(IOException)
    {
    System.out.println("I/0 Error");
    }
    }
    }



    can anyone explain this simple code for me?urgently in use

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Ugh...it reads input and spits it out?

  3. #3
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    On a C++ board?????

  4. #4
    Registered User Invincible's Avatar
    Join Date
    Feb 2002
    Posts
    210
    Blasphemy! Moderators!
    "The mind, like a parachute, only functions when open."

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    can anyone explain this simple code for me?urgently in use
    Do you have no brain? Or maybe you just can't spell c++.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    *waves flaming brand*
    Get thee back satan
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Location
    Fiji
    Posts
    212
    when did Java become a synomyn for C++?

    Think my spelling is right?

  8. #8
    Well, I wasnt sure what do do with this so it got moved to the GD... Seems like the best option... ?
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  9. #9
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    lol congratulations you have successfully confused the mods

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Java for real-time applications
    By zacs7 in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-26-2008, 06:34 AM
  2. C#, Java, C++
    By incognito in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 10-05-2004, 02:06 PM
  3. First Java Class at college
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 09-29-2004, 10:38 PM
  4. The Java language is being expanded
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 06-11-2004, 09:07 PM
  5. Java woes
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-06-2003, 12:37 AM