[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/bcsangeetha/Java-Programs/master/String/LargeWordCount.java [Back]  [Original]

package String;

public class LargeWordCount {

	public static String[] split(String s) {
		int c = 0;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == ' ')
				c++;
		}
		String[] temp = new String[c + 1];
		String t = "";
		int i=0;
		for (int j = 0; j < s.length(); j++) {
			if (s.charAt(j) != ' ') {
				t += s.charAt(j);
			} else {
				temp[i++] = t;
				t = "";
			}
		}
		temp[i] = t;
		return temp;
	}
	public static void sort(String[] s) {
		for(int j=0;j

Web Proxy Viewer  |  New URL  |  Original Page