java - String matching operation -


I have two strings (they can be anything) like I'm a boy and < Code> I'm a man where I'm one is normal My job is to find common words with two stars.

I set to store the data & lt; String & gt; , but it only stores unique values, so my question is, how can I get general words from two strings?

The above two sentences, for example, should produce the result {"I", "am", "a"} , that is, the set of general words for both sentences.

set a & lt; String & gt; Better use that stores the frequency number for each word.

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -