need some help anything is appreciated!
I'm trying to create an method that takes a certain part of an array to make a new array that contains only those parts.
For example if I had an array with given array S = [“John Smith”, “Alice Huntington”, “George H. Baker”, “Helen Z. Gordon”], the program would return array T = [“J.S.”, “A.H.”, “G.H.B.”, “H.Z.G”].
I've done some searching online and found how charAt(0); I can take just the first initial but that's for a string and only the first letter. I don't know to get the last names or middle for example. Using an ArrayList is the right choice I think but I don't know how to transfer contents from one to the other.