Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

explanation here!

 
Mitchell Kave
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
explain java p for me!

can anyone explain this simple code for me?urgently in use
[ May 27, 2002: Message edited by: Rob Ross ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mitchell,
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner!
 
Mitchell Kave
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hei,dirk
what's wrong with my name?i like it called mitchell,so what?anyway,r u guys moderator going to help me with the problem or not?...........
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll make you a deal. Change your display name to comply with The JavaRanch Naming Policy and I'll answer your question.
Thanks Pardner!
 
Mitchell Kave
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hei,dirk
i have changed the nickname already,so what's the next?tell me all in one shot,what a lousy site over here?
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mitchell, what is the question exactly? What are you confused about?
First, I don't think this code will even compile.
"system.out.println("....");"
will give you an unkown identifier error or something like that, because there's no accessible class named "system" with a lowercase 's'. Try System.out.println("....");
Other than that, is your question about the File io, or about the while loop, or about the main() as an entry point into the application? If you ask a specific question it is much easier to help you.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mitchell,
Once you correct your syntax errors ... the code effectively performs the following:
1. Open a file named "test.java"
2. Read in one byte at a time
3. Append the read byte onto a string variable
4. Print out the entire string variable
If any error occurs during the first 4 steps print out an appropriate error message. For example:
"test.java" doesn't exist will create a FileNotFoundException which is a subclass of IOException
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic