Author Topic:   Files
shan
unregistered
posted February 20, 2000 09:25 PM           
FileOutputStream o = new FileOutputStream
String s = "test"
for(int i =0 i outStream.write(s.charAt(i)); //4bytes are written
outStream.close()

It is given in mock exam that the above outStream obj
writes 4 bytes ? how is this ?
I think it is 8 bytes becoz u have a characters which are
written

maha anna
bartender
posted February 20, 2000 10:42 PM             
the .write(..) method writes ONLY the LOWER BYTE of the argument.
maha anna

|