How to write and read data in a file using IO and different streams in java? -
how write , read data in file using io , different streams in java ?
i trying write data in abc.txt file whic inside file (say xyz) , using input/ output stream of byte , char stream ??
give broad explanation please ?
this have far:
import java.io.*; class writedata1 { public static void main(string[] args) throws ioexception { system.out.println("tryimg write in text"); printstream ps = new printstream(system.out); ps.println("hi"); ps.println("its show time"); ps.close(); } }
if using printstream should pass file argument.
printstream ps = new printstream( new file("abc.txt"));
Comments
Post a Comment