2 Replies Latest reply on Oct 19, 2007 12:58 AM by 807603

    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//