Does anyone know how to do file input and output in Java?
Does anyone know how to do file input and output in Java?
>Why not ask at a Java forum?
Probably because the question is simple enough that many people here can answer it.
>Does anyone know how to do file input and output in Java?
Create an object of the FileInputStream and FileOutputStream classes:
Then you have read and write and such to actually do the I/O. Look up those classes on the Sun website for details of what you can do.Code:FileInputStream fin = new FileInputStream ( "path" ); FileOutputStream fout = new FileOutputStream ( "path" );
Last edited by Prelude; 03-09-2004 at 01:36 PM.
My best code is written with the delete key.