This shows you the differences between two versions of the page.
|
java:lang:string:toarray [2013/04/18 08:45] 88.74.75.6 created |
java:lang:string:toarray [2024/02/16 01:12] (current) |
||
|---|---|---|---|
| Line 18: | Line 18: | ||
| - | System.out.println(str); | + | System.out.println(str); // print the String |
| text = str.toCharArray(); | text = str.toCharArray(); | ||
| for (int i = 0; i <= text.length - 1; i++) { | for (int i = 0; i <= text.length - 1; i++) { | ||
| - | System.out.println(text[i]); | + | System.out.println(text[i]); // print the content of text Array |
| } | } | ||