I need to find repeated words on a string, and then count how many times they were repeated. So basically, if the input string is this:
String s = \"House, House
public static void main(String[] args) { String s="sdf sdfsdfsd sdfsdfsd sdfsdfsd sdf sdf sdf "; String st[]=s.split(" "); System.out.println(st.length); Map mp= new TreeMap(); for(int i=0;i