try{
BufferedReader br = null;
String file =searchTXT.getText();
try {
int i =0;
br = new BufferedReader(new FileReader("CustomerDATA.txt"));
String line ;
try {
while((line = br.readLine()) != null && line.equals(file))
{
// line = br.readLine();
for( int o = 1; o <=8; o++)
{ String firstToken = line.split(",")[0];
// System.out.println (line);
line = br.readLine();
CusDetail.add(line);
//
arraytxt.append(line + "\n");
size++;
}
i want to search account in the file when user input ..the above code is working for me ...but it wont read the first line which is the matching with the line ...what is the error??