2 Replies Latest reply: Oct 18, 2007 7:58 PM by 807603 RSS

    how to return a word from an input string in random

      iam trying to return a single word from an input string.the word has to be selected in random.can u help?

      this is wat i tried so far
      private String findKeyWord(String remark)
      String[] input= stringobj.trim().toLowerCase().split(" "); // am splitting the string here and it gets stored in string array//
      return ????? //i should return any one word in the string in random//