Saturday, June 27, 2009

How to Read Text from a File


try {
BufferedReader in = new BufferedReader(new FileReader("C:/temp/temp.txt"));
String str;
while ((str = in.readLine()) != null) {
System.out.println(str);
}
in.close();
} catch (IOException e) {
}

1 comments:

Marimuthu Udhayakumar on August 7, 2009 at 8:00 AM said...

Hi Techsavy,
I have come across to your blog while surfing in net,It was too amazing while looked your blog contends ,It would be very helpful for jave aspirants and learners.your are doing good job..I am Marimuthu from India.I would like to be a good friends with you,If you like me and my profile.pls give me chat invitation to my gmail id ,My gmail id is teknoturfian@gmail.com
Take care,Have a good day..

Thanks and regards,
P.Marimuthu
http://teknoturfian.blogspot.com

 

Sample Java Codes Copyright © 2008 Green Scrapbook Diary Designed by SimplyWP | Made free by Scrapbooking Software | Bloggerized by Ipiet Notez