All pastes #32829 Raw Edit

Mine

public text v1 · immutable
#32829 ·published 2005-12-07 19:49 UTC
rendered paste body
public class blackyt
{
   public static void main(String [] args)
   {

     String [] english ={"hello", "hi", "pardon", "excuse", "my", "friend"
,"sir" , "madam", "miss", "stranger", "where", "is", "the" ,"you", "tell",
"know", "how far" ,"old", "attractive", "happy" ,"nearby", "restroom","restaurant",
"hotel", "pub","bank"} ;
     String [] pirate = {"ahoy","yo-ho-ho","avast","arrr", "me", "bucko",
 "matey","proud beauty","comely wench", "scurvy dog", "whar", "be","th","ye", "be tellin",
"be knowin", "how many leagues","barnacle-covered" , "comely","grog-filled",
 "broadside","head","galley","fleabag inn","Skull & Scuppers","buried treasure"};
     System.out.println("Enter a word: ");

     String newWord = "";
     String word = Console.readString();
     int index = 0;

     if(word != null)
     {
  for(int i =0; i < english.length;i++)
  {
     if(english[i].compareTo(word) == 1)
     {
              index = i;
     }
  }

     }
     if(index != 0)
     {
        System.out.println("The Pirate version of the word is "+ pirate[index]);
     }
     else
     {
        System.out.println("There is no Pirate version of the word");
     }
 }
}