|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSearchMethods
public class SearchMethods
A class that demonstrates search algorithms
Constructor Summary | |
---|---|
SearchMethods()
|
Method Summary | |
---|---|
static String |
find(String target,
String[] strArray)
Implement a simple binary search through the array of strings |
static String |
lfind(String target,
String[] strArray)
Implement a linear search through the array of strings |
static void |
main(String[] args)
main for testing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchMethods()
Method Detail |
---|
public static String lfind(String target, String[] strArray)
target
- the string to look forstrArray
- the array of strings to look inpublic static String find(String target, String[] strArray)
target
- the string to look forstrArray
- the array of strings to look inpublic static void main(String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |