You did not use the file,filereader methodwithout this you cannot write the programmeyou can write with this help in the search methoduse try and catch(Exception name) //outofArrayboundmessage.