K
karthika
i have two things one is vector (vec) and a map ( map ) and the code
will be
for ( int i = 0;i<vec.size() ;i++ )
{
Class obj = ( Class )vec.get( i );
for ( Iterator it = map.keySet().iterator();it.hasNext()
{
key = (String)it.next();
Class2 obj2 = ( Class2 )map.get( key );
if (!info.contains(obj2))
{
v1.add(obj);
}
else
v1.remove(obj);
}
}
}
here what would be the result. becoz i get the answers as a repeated
one.
Pleease help :-(
will be
for ( int i = 0;i<vec.size() ;i++ )
{
Class obj = ( Class )vec.get( i );
for ( Iterator it = map.keySet().iterator();it.hasNext()
{
key = (String)it.next();
Class2 obj2 = ( Class2 )map.get( key );
if (!info.contains(obj2))
{
v1.add(obj);
}
else
v1.remove(obj);
}
}
}
here what would be the result. becoz i get the answers as a repeated
one.
Pleease help :-(