Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

subWords method1

By: ace on Jun 2nd, 2010  |  syntax: None  |  size: 0.79 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public String subWords(String string, ArrayList<String> nouns, ArrayList<String> verbs,
  2. ArrayList <String> adjs)
  3. {
  4. int index = 0;
  5.     if (string == "nouns")
  6.     {
  7.   while (index <= nouns.size()-1)
  8.         {
  9.             System.out.println("string" + subNoun(string, nouns));
  10.             return subNoun(string, nouns);
  11.         }  
  12.     }  
  13.     if (string == verbs.get(index))
  14.     {
  15.         while (index < verbs.size() - 1)
  16.            {
  17.                return subVerb(string, verbs);
  18.             }
  19.         }
  20.           else
  21.                 {
  22.                   while (index <= adjs.size() -1)  
  23.                     {
  24.                         return subAdj(string, adjs);
  25.                     }
  26.                 }
  27.                    
  28.                     return string;
  29.                 }