ورود

View Full Version : تابع فایل



alu_ali
جمعه 08 اردیبهشت 1385, 21:53 عصر
با سلام
توابع که با ان بتوان فایلی را درست کرد و اونو نمایش داد چیست مثلا اطلاعات دانشجویان رو ذخیره کنه و نمایش بده
با تشکر

sarvestan
شنبه 09 اردیبهشت 1385, 06:08 صبح
FileWriter outfile= new FileWriter(filename);
outfile.write('c');
outfile.close();

FileReader outfile= new FileReader(filename);
int nextchar=outfile.read();
outfile.close();

this read() and write() has other overrides that u can use to read/write more than 1 char eachtime. u will find them!!!