Link to home
Start Free TrialLog in
Avatar of rana_m
rana_m

asked on

write to output file

I want to write (integer,string,float,boolean) to output file how to create output file and who to write to it.
with regards
Avatar of functionpointer
functionpointer

why cant you

//say....
String str = "a string";
int i = 9;
float flt = 3.4;
boolean b = false;


FileWriter fw = new FileWriter( new File( "test" ) );
fw.write( i );
fw.write( str );
fw.write( flt );
fw.write( b );

fw.close();

?
ASKER CERTIFIED SOLUTION
Avatar of b612_forever
b612_forever

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial