0
how to save strings into an array and display it? JAVA
This is pretty long code. https://code.sololearn.com/cbJNq1Vcrzmg I don't know how to save each string into an array and display it... I really appreciate any help!
1 Respuesta
+ 2
Like this:
String[] strings = new String[2];
strings[0] = "hello";
strings[1] = "world";
for (String s : strings) {
System.out.println(s);
}