@@ -0,0 +1,531 @@
+package javarevisited.top.fifty.java.programs.from.coding.interviews;%0A%0Apublic class RemoveWhiteSpacesFromString %7B%0A%09%0A%09public static String removeWhiteSpacesFromString(String s) %7B%0A%09%09String%5B%5D array = s.split(%22 %22);%0A%09%09StringBuilder result = new StringBuilder();%0A%09%09for (int i = 0; i %3C array.length; i++) %7B%0A%09%09%09result.append(array%5Bi%5D);%0A%09%09%7D%0A%09%09return result.toString();%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09String s = %22I love Java%22;%0A%09%09System.out.println(%22String without white spaces is: %22 + removeWhiteSpacesFromString(s));%0A%09%7D%0A%7D%0A

remove white spaces from string