I've seen some other questions with the same title, but it isn't the same problem. I'd like to convert strings that are contained in an array into arrays themselves.
So I've got this :
String str = "hello";
That I'm able to turn into a string array with this :
String[] arr = str.split("");
Which gives {"h", "e", "l", "l", "o"}
So I'd like to turn this into an array of objects in which every object would be a string array.
So that I would be able to call h[0]
(earlier initialize) in something like System.out.println(h[0])
.
I assume this isn't pretty clear since I'm not a native English speaker, so I would be glad to sharpen my explanations.
EDIT : for example I initialize
String[] h = {"* *",
"* *",
"*****",
"* *",
"* *"};
and other "letters" before all of that, and eventually I want to print with
for (int l=0; l<str.lenght(); l++) {
//Do what I explained above which would return the array letter = h (also the array)
for (int s=0; s<5; s++) {
System.out.println(letter[i]);
}
}
And the output shows "hello" char of * by char of *.