I had a notepad... which contains... 3489 numbers...
I can search for a particular number but I would like to know the position of that number in the notepad..
example file:
123, 1245, 124, 567, 678, 6787,56778,345,6786,234,89,897,4556,5890,456,890,489,6798...
all numbers are unique...
ok if i seach for 567 If I can find it then i can print it but i would lke to know the position of that number 567
here the position is 4
I.e, when you have got the contents of the file in a string, you just need to do indexOf(<string to be searched>); , it should display the index of that number in that string
For getting file contents in string
http://snippets.dzone.com/posts/show/1335
http://www.kodejava.org/examples/52.html