import java.util.*; class wordFrequency{ public static void main(String args[]){ String paragraph= "ab bc ab bc abbbb bc ab cd ef bc bc "; String eachWord[]=paragraph.split(" "); ArrayListlistEachWord = new ArrayList (Arrays.asList(eachWord)); LinkedHashMap numeach=new LinkedHashMap (); for(int i=0;i<eachWord.length;i++){ numeach.put(eachWord[i],Collections.frequency(listEachWord,eachWord[i])); } System.out.println(numeach); }}
spring boot CORS filter along with spring security and OAuth2 (@EnableOAuth2Sso) import org.springframework.stereotype.Component; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException;
Comments
Post a Comment