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;

}

}

}

[1812 byte] By [_quesa] at [2007-11-27 7:54:32]
# 1
It's not clear what you're trying to do, and it's not clear what's going wrong. Please explain more precisely.
jverda at 2007-7-12 19:35:50 > top of Java-index,Java Essentials,Java Programming...