Hi this is Mr. VIshal Bhalabar. To find one word, take that word in one string. And open the file which is to be searched in read mode. Use the function of "substring" for every line of a file. You will find out that word in file.
e.x. String s = hydrabad After reading a line from file. str = br.readLine(). then use substring fun to find req. word. On 11/15/09, Siddhartha Ghosh <[email protected]> wrote: > > Hi All, > I am in need of some Java code (core Java) for file operations. Can nay > body help me out. I am not a a good Java code writer. > The work is like - > 1. a java file which will open a text file and then will do a string search > operation (1st for single words and then for two-words **) in the text file. > 2. To do the search the key words the will be kept in two text files - one > for single words and another for two words. > * Single word key file - > Hyderabad > AP > festival > sports > *two words key file - > Hyderabad City > AP Govt. > Winter Festival. > etc > > > > *Siddhartha G* > *Hyderabad* > *Mobile:+91-9959613556* > > > > > ------------------------------ > The INTERNET now has a personality. YOURS! See your Yahoo! > Homepage<http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/> > .

