I taking a string input from console. If I input "abcd" and spilt like this way
Scanner input = new Scanner(System.in);
String[]stringInput = input.nextLine().toLowerCase().trim().split("");
Suppose, I have entered "abcd" as input, stringInput.length is showing 5. But, It should be 4 right ? What's wrong, I am doing here ? Any idea ? How can I solve that ?