I have this simple code that split an input and put it in array of String:
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String[] arraySentence = s.split(" ");
for (int i = 0; i<arraySentence.length; i++) {
arraySentence[i].toCharArray();
System.out.println(arraySentence[i].toCharArray());
}
my focus is to manage every character of every single word into the array.
For example if I pass: "now we only have"
the string from input becomes: arraySentence{now, we, only, have} and I want to be able to take the "n" after the "o" then "w", etc.
How can do it? Thanks