Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What classes must I use to read a file and write to it?

user-image
Question added by Abdulelah Fallatah , Tech-Support Specialist & Programmer , Al-Rayan Colleges
Date Posted: 2015/07/14

in java IO/NIO API  , you can use FileReader/Writer or wrapped classes from these class , read oracle docs for these APIs

Emad Mohammed said abdalla
by Emad Mohammed said abdalla , ERP & IT Software, operation general manager . , AL DOHA Company

I fully agree with the answers been added by EXPERTS....................Thanks.

Tomasz Modrzejewski
by Tomasz Modrzejewski , Programmer , Company Skraw-Mech

Can only save the file open for writing (in 'on' or 'a'). Mode 'w' deletes the previous contents of the file. Mode 'and' forces append to the end of existing file. plik.write (text) appends text to the end of the file. If we want to add something that is not text, you must convert it before using the str (). write () writes no nothing "apart", even separator. plik.writelines (array) appends to file a list of strings taken from a table, not separating them no separator. If we want to put them on separate lines, it should end with a \\ n plik.writeline (text) ... would like to, but it is not quite ... If you want to save to a file full line, is credited content you need to just end with \\ n Writing to a file applies only to the value of subtitles. Write the values ​​of other types must be preceded by the conversion, for example. Plik.write (p (value)).

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.