problem with vector....
i have two text files with 10000 phone numbers each ; read data from both and stored as string in vector
now comparing two in following way do not give the desired result
ie if it do not compare the strings present in the middle of the files....
plz help....
Enumeration e,e1;
e=v3.elements();
e1=v4.elements();
System.out.println("comparing Data of both the files.......\n");
while(e.hasMoreElements())
{
element1 =(String) e.nextElement();
while(e1.hasMoreElements())
{
element2=(String)e1.nextElement();
if(element1.equals(element2))
{
try
{//System.out.println(element2 );
//System.out.println(element1 );
boolean append=true;
FileWriter fw =new FileWriter("bulk.txt",append);
fw.write(element1);//appends the string to the file
fw.close();
}
catch(Exception ex1)
{
System.out.println("error"+ex1 );
ex1.printStackTrace();
}//catch closed
break;
}
}
}

