• Post Reply Bookmark Topic Watch Topic
  • New Topic

scenario based question on core java  RSS feed

 
Bandita Patel
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an Arraylist of 1lakh records which contains empID & empName ...then how can i find the empID as 1235?(instead of iterating the loop)
kindly reply me ASAP...Thanks
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bandita Acharya wrote:kindly reply me ASAP...

Please EaseUp
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
empID & empName - are these String variables. Why not just use ArrayList:contains("1234") to check if its there?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ArrayList of what? is it an object which wraps empID and empName or string which represents empId,empname etc or ?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bandita, please Use A Meaningful Subject Line. "scenario based question on core java" isn't one, and is still worse when you use the same subject line for more than one post.
 
Bandita Patel
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!