aspose file tools*
The moose likes Java in General and the fly likes Different kinds of Search mechanisms using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Different kinds of Search mechanisms using Java" Watch "Different kinds of Search mechanisms using Java" New topic
Author

Different kinds of Search mechanisms using Java

Mathew Chen
Greenhorn

Joined: Aug 01, 2005
Posts: 18
Hi,
I was wondering as to what kind of searching techniques(eg binary search etc) can be used with Java?

Thanks
Mathew Chen
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42919
    
  68
Any technique you care to implement

Seriously, what do want to search? That will determine how you can go about it.
Mathew Chen
Greenhorn

Joined: Aug 01, 2005
Posts: 18
Thanks Ulf for your reply.What I wanted to know was if there were certain theoretical concepts to be understood to implement the search technique.For eg I know that binary search is one technique.I was wondering if there is any other technique available.

Thanks again
Mathew Chen
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42919
    
  68
Wikipedia is your friend.
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
You can also use a basic linear search. In fact, you need to use these in situations where your data has no order. But AFAIK binary search is the best algorithm for situations where the data is sorted.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
You should look at the JavaDocs for the Java "Collections" API in the java.util package. There you will find all sorts of standard library support for sorting and searching.
The Jakarta commons project has extended that base with a variety of special purpose collections.
You will have to get more specific about what you are searching if you want more detailed discussion.
Bill
Mathew Chen
Greenhorn

Joined: Aug 01, 2005
Posts: 18
Thanks guys for your responses.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Different kinds of Search mechanisms using Java