let\'s say I have this string array in java
String[] test = {"hahaha lol", "jeng jeng jeng", &quo
for each String you would do a replaceAll("\\s", "%20")