• Post Reply Bookmark Topic Watch Topic
  • New Topic

collection  RSS feed

 
sri jaisi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.public boolean contains(object o){..};wat technique is used to find whether the given object is part of that collection
2.which jdbc driver is the fastest one?
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sri jaisi:
1.public boolean contains(object o){..};wat technique is used to find whether the given object is part of that collection
2.which jdbc driver is the fastest one?


Well I shoudn't help you in finding Algorthims of JAVA.. You may find out...

But ok fine..



But this is how it's happening .....

conatins(Object o) call a method indexOf(Object o, int index).. which is doing all work....

Hope this clears your first Question..

Originally posted by sri jaisi:

Q. 2.which jdbc driver is the fastest one?


Answer is : Type 4 - Native Protocol


Now why it is so.. I would suggest you to read the articles of Various JDBC drivers and their architecture......


Hope this helps you.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course the question which JDBC driver is fastest (when all are type 4) is pretty much irrelevant.
Not only can there be no comparison between the drivers themselves (they after all depend on external resources for everything) but that in itself means that driver performance is moot.
When a database call takes a second to complete it's useless to worry about the question whether changing to another JDBC driver would mean a 1 millisecond performance improvement (and that's the order of difference you'd be worrying about).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!