Link to home
Start Free TrialLog in
Avatar of sunda2010
sunda2010

asked on

how to sort the elements

sir,
         I m want to know how to separate a repeated words in a paragraph .To allocate a repeated words in priority level wise.To separate the repeated words using sorting method.I m want to sample programs in this topic.
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

<<To allocate a repeated words in priority level wise>>
please elaborate with example

<<To separate the repeated words using sorting method>>
Also, didn't understand this, please explain with example

Read the paragraph into a string and split the string by space, i.e

String str = "whole paragraph";
str.trim().split("\\s");
http://leepoint.net/notes-java/data/strings/40regular_expressions/10regex-string.html
http://stackoverflow.com/questions/225337/how-do-i-split-a-string-with-any-whitespace-chars-as-delimiters

ASKER CERTIFIED SOLUTION
Avatar of __geof__
__geof__
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial