java - String Array Split -


string s = "hello java, java independent. java"; 

here can change word java upper case splitting it.

    string[] s2 = s.split(" ");      (string v : s2) {         system.out.println(v);     } 

again how join them after correcting case?

just use regex, this:

string x = s.replaceall("[j|j][a|a][v|v][a|a]", "java"); 

that's easier using split, since 1 of strings have comma in (i.e. "java,").