Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public HashMap<String, LinkedList<String>> wordIndex = new HashMap<>();
  2.  
  3. String getWord(String query) { //query=user input in this case algorithms
  4.  
  5. if(wordIndex.containsValue(query.toLowerCase()))
  6. {
  7. return "hello"; //should return hello if word is found
  8. }
  9. else
  10. {
  11. return "none";
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement