PDA

View Full Version : explain java p for me!



Unregistered
05-24-2002, 09:30 AM
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

Fordy
05-24-2002, 01:22 PM
Ugh...it reads input and spits it out?

ErionD
05-24-2002, 02:02 PM
On a C++ board?????

Invincible
05-24-2002, 03:18 PM
Blasphemy! Moderators!

Hammer
05-24-2002, 03:20 PM
can anyone explain this simple code for me?urgently in use
Do you have no brain? Or maybe you just can't spell c++. :rolleyes:

C_Coder
05-24-2002, 03:21 PM
*waves flaming brand*
Get thee back satan

kwigibo
05-24-2002, 04:32 PM
when did Java become a synomyn for C++?

Think my spelling is right? :D

lightatdawn
05-24-2002, 06:27 PM
Well, I wasnt sure what do do with this so it got moved to the GD... Seems like the best option... ?

ErionD
05-25-2002, 04:46 AM
lol congratulations you have successfully confused the mods :D