Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  India NewsIndia News  
Keywords
question science CLASS 2010 2009 2007 2006 RESULT papers CASE 2004 paper SELECT YEAR computer physics ICSE graph UNION prelim
Latest topics
» Nitration of aniline - IIT JEE 2018 Advanced - solved
Basic File handling program in java with reader/writer EmptyFri Jun 08, 2018 2:34 am by adianadiadi

» Diamagnetic - Paramagnetic - Ni(CO)4, [Ni(CN)4]2- and [NiCl4
Basic File handling program in java with reader/writer EmptyFri Apr 06, 2018 1:05 am by adianadiadi

» IIT JEE chemistry solved interactive question paper
Basic File handling program in java with reader/writer EmptySun Oct 29, 2017 12:11 pm by adianadiadi

» IIT JEE 2015 SOLVED QUESTION PAPER
Basic File handling program in java with reader/writer EmptyWed Oct 19, 2016 1:44 pm by adianadiadi

» IIT JEE chemistry solved questions
Basic File handling program in java with reader/writer EmptySat Jul 18, 2015 6:15 pm by adianadiadi

» General Description of Chinese Market for Foaming Agent ADC
Basic File handling program in java with reader/writer EmptyFri May 09, 2014 2:09 pm by happybaicaitou

» How to get Lowest Cost MBBS Admission?
Basic File handling program in java with reader/writer EmptyMon Feb 24, 2014 6:39 pm by MENTOR 2014

»  girl boy vashikaran specialist agori baba ji +91-9461165
Basic File handling program in java with reader/writer EmptyTue Jan 21, 2014 6:00 pm by krshastri

»  STRONG LOST LOVE SPELL +91-9461165176
Basic File handling program in java with reader/writer EmptyTue Jan 21, 2014 6:00 pm by krshastri

Top posters
abhas
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
Anu..i luv icse...:)
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
G-7
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
siya
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
Candy
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
jOhNy
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
Apurva
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
WinRrule
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
ambili
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 
saif
Basic File handling program in java with reader/writer Vote_lcapBasic File handling program in java with reader/writer Voting_barBasic File handling program in java with reader/writer Vote_rcap 



Search if you can't find it here

Basic File handling program in java with reader/writer

View previous topic View next topic Go down
AuthorMessage
abhas
Active member
Active member
abhas


Basic File handling program in java with reader/writer Vide
PostSubject: Basic File handling program in java with reader/writer Basic File handling program in java with reader/writer EmptySat Jun 27, 2009 6:15 pm

import java.io.*;


class fileH2
{
public static void main(String args[])throws IOException
{
BufferedReader obj=new BufferedReader(new InputStreamReader(System.in));

System.out.println("Enter a number of elements");
int n=Integer.parseInt(obj.readLine());

FileWriter fw=new FileWriter("Stu2.dat",true);
BufferedWriter Bw=new BufferedWriter(fw);
PrintWriter pw=new PrintWriter(Bw);

for(int a=0;a<n;a++)
{

System.out.println("Enter serial number");
int c=Integer.parseInt(obj.readLine());
System.out.println("Enter Name");
String N=obj.readLine();
pw.println(c+" "+N);

}
Bw.close();
fw.close();
pw.close();



FileReader fr=new FileReader("Stu2.dat");
BufferedReader br=new BufferedReader(fr);

String abhas;
while((abhas=br.readLine())!=null)
{

System.out.println(abhas);
}

fr.close();
br.close();
}
}
Back to top Go down

Basic File handling program in java with reader/writer

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: ISC :: ISC 2010 [Class xii] :: Computer-