I have prepared a simple code snippet in order to separate the erroneous portion from my web application. public class Main { public static void main(String[] args) throws IOException { System.out.print("\nEnter a string:->"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String temp = br.readLine(); String words[] = temp.split("."); for (int i = 0; i < words.length; i+