Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integer Array and Vector iteration and Look up 1

Status
Not open for further replies.

DB2Problem

Programmer
Oct 17, 2002
53
0
0
US
Hello ALL,

I have some values in vector say {501, 502}.

Now I have an array of Integer that gets SOME, ALL or NONE values that are in the above vector.

My problem is to check if the values coming from this dynamic array exits in the vector.

Based on presence and absence I have to do some processing. If the value doesn't exits I have to insert in
Database , but if one of the values exists then I have to perform update


But the bottom line is - Iterate the array and check if the values exits in the vector

There can be 3 possibilities
1. All values Exists
2. Some values exists
3. Doesn't exists AT all
Integer a [] = new Integer (); // this is dynamic integer array
Vector a = new Vector (); // this is vector that has some integer values
 
Please, post this questions in the Java forum, this one is just for J2EE questions.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top