I want to split a string like "My dog" into an array of:
| M | y | space char will be in here | D | o | g |
Here is my code:
String []in_array;
input = sc.next();
in_array = input.split(""); //Note this there is no delimiter
for(int k=1; k < in_array.length; k++){
System.out.print(" "+in_array[k]);
}
EDIT:
It only prints out "My"